Download presentation
Presentation is loading. Please wait.
Published byDwain Hicks Modified over 9 years ago
1
OSes: 3. OS Structs 1 Operating Systems v Objectives –summarise OSes from several perspectives Certificate Program in Software Development CSE-TC and CSIM, AIT September -- November, 2003 3. OS Structures (Ch. 3, S&G)
2
OSes: 3. OS Structs 2 Contents 1.OS Components 2.OS Services 3.System Calls 4.System Structure 5.Virtual Machines 6.OS Design and Implementation
3
OSes: 3. OS Structs 3 1. OS Components 1.1.Process/thread Management 1.2.Main Memory Management 1.3.Secondary Storage Management 1.4.I/O System Management 1.5.File Management 1.6.Protection/Security 1.7.Networking
4
OSes: 3. OS Structs 4 1.1. Process/thread Mgmt. v Programs are passive v Processes execute, each with its own program counter, but shared resources v Threads are light-weight processes –much simpler state and control continued
5
OSes: 3. OS Structs 5 v Management tools: –creation/deletion –suspension/resumption –synchronisation –communication –resource allocation/release –deadlock handling
6
OSes: 3. OS Structs 6 1.2. Main Memory Mgmt. v Depends on system and hardware support v Track memory usage v Decide on process scheduling v Allocate/deallocate memory to jobs
7
OSes: 3. OS Structs 7 1.3. Secondary Storage Mgmt. v Storage and retrieval v Scheduling v Free space management v Efficient usage is essential
8
OSes: 3. OS Structs 8 1.4. I/O System Mgmt. v Aim: hide device peculiarities v Features: –buffering, caching, spooling –support an abstract interface to devices –support a range of specific devices
9
OSes: 3. OS Structs 9 1.5. File Mgmt. v Many types of file systems, with different properties: –speed, capacity, data transfer rate, access method (e.g. sequential, random) v Aim: provide a consistent, logical view: –files and directories continued
10
OSes: 3. OS Structs 10 v Features: –creation/deletion of files & directories –manipulation u open, close u read, write, seek u get/set attributes –mapping to physical storage –backup/archiving
11
OSes: 3. OS Structs 11 1.6. Protection/Security v Protection: controlling the access of programs, processes, or users to the system’s resources –e.g. CPU, files, peripherials v Network aspects of protection are becoming increasingly important
12
OSes: 3. OS Structs 12 1.7. Networking v Main machine types: –multiprocessor systems –distributed systems v Two main communication models: –message passing –shared memory continued
13
OSes: 3. OS Structs 13 Communication Models Fig. 3.5, p.66 process A M process B M kernel M 1 2 Message Passing process A process B shared memory 1 2 kernel Shared memory
14
OSes: 3. OS Structs 14 2. OS Services v User services: –program execution; I/O operations; file manipulation; communication; error detection v System efficiency: –resource allocation; accounting; protection
15
OSes: 3. OS Structs 15 3. System Calls v Process control v File manipulation v Device manipulation v Information maintenance v Communications
16
OSes: 3. OS Structs 16 4. System Structure v UNIX (fig. 3.7, p.70) system call interface to kernel kernel interface to the kernel signals terminal handling character I/O system terminal drivers file system swapping block I/O system disk and tape drivers CPU scheduling page replacement demand paging virtual memory terminal controllers terminals device controllers disks and tapes memory controllers physical memory shells and commands compilers and interpreters system libraries USERS
17
OSes: 3. OS Structs 17 Layered Approach Fig. 3.8, p.71 layer M-1 : hidden operations layer M existing operations new operations : :
18
OSes: 3. OS Structs 18 THE Layer Structure layer 5:user programs layer 4:buffering for I/O devices layer 3:operator-console device drivers layer 2:memory management layer 1:CPU scheduling layer 0:hardware
19
OSes: 3. OS Structs 19 5. Virtual Machines v A virtual machine supplies a set of ‘system’ calls that support a machine in software –it rests on top of the underlying physical hardware v A virtual machine may be different from the underlying hardware.
20
OSes: 3. OS Structs 20 Issues v The hardware places limits on the virtual machine’s functionality –e.g. the number/type of peripherals v How to support virtual user and monitor modes in physical user mode? v Speed
21
OSes: 3. OS Structs 21 Advantages v A virtual machine can protect physical system resources v Portability v Research/development
22
OSes: 3. OS Structs 22 Disadvantages v Difficult to implement a fast system. v Hard to support modes. v Speed issues may require simulation and/or direct access to the underlying OS or hardware.
23
OSes: 3. OS Structs 23 6. OS Design & Implementation v 6.1. Design Goals –user and system design goals may conflict –goal tend to be vague u e.g. easy to use, easy to implement
24
OSes: 3. OS Structs 24 6.2. Mechanisms & Policies v Separate policy from mechanism –policy: what will be done –mechanism: how to do it v Example: CPU protection –mechanism: timer –policy: timer period v Flexibility v Micro-kernels vs. monoliths
25
OSes: 3. OS Structs 25 6.3. Implementation v Assembly language vs. high-level languages v Example: UNIX is coded in C but for ~900 lines of assembler for the scheduler and device drivers
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.