Professional Documents
Culture Documents
OSStructs
OSStructs
3. OS Structures
(Ch. 3, S&G)
Objectives
– summarise OSes from several perspectives
OSes: 3. OS Structs 1
Contents
1. OS Components
2. OS Services
3. System Calls
4. System Structure
5. Virtual Machines
6. OS Design and Implementation
OSes: 3. OS Structs 2
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
OSes: 3. OS Structs 3
1.1. Process/thread Mgmt.
OSes: 3. OS Structs 5
1.2. Main Memory Mgmt.
OSes: 3. OS Structs 6
1.3. Secondary Storage Mgmt.
Scheduling
OSes: 3. OS Structs 7
1.4. I/O System Mgmt.
Features:
– buffering, caching, spooling
– support an abstract interface to devices
– support a range of specific devices
OSes: 3. OS Structs 8
1.5. File Mgmt.
OSes: 3. OS Structs 10
1.6. Protection/Security
OSes: 3. OS Structs 11
1.7. Networking
process A M process A 1
1
process B M process B
2
2
shared memory
kernel M kernel
OSes: 3. OS Structs 13
2. OS Services
User services:
– program execution; I/O operations;
file manipulation; communication;
error detection
System efficiency:
– resource allocation; accounting;
protection
OSes: 3. OS Structs 14
3. System Calls
Process control
File manipulation
Device manipulation
Information maintenance
Communications
OSes: 3. OS Structs 15
4. System Structure
UNIX (fig. 3.7, p.70)
USERS
shells and commands
compilers and interpreters
system libraries
system call interface to kernel
signals file system CPU scheduling
terminal handling swapping page replacement
character I/O system block I/O system demand paging
terminal drivers disk and tape drivers virtual memory
kernel interface to the kernel
terminal controllers device controllers memory controllers
terminals disks and tapes physical memory
OSes: 3. OS Structs 16
Layered Approach Fig. 3.8, p.71
new layer M
operations :
layer M-1
hidden :
operations
existing
operations :
OSes: 3. OS Structs 17
THE Layer Structure
OSes: 3. OS Structs 18
5. Virtual Machines
OSes: 3. OS Structs 19
Issues
Speed
OSes: 3. OS Structs 20
Advantages
Portability
Research/development
OSes: 3. OS Structs 21
Disadvantages
OSes: 3. OS Structs 22
6. OS Design & Implementation
OSes: 3. OS Structs 23
6.2. Mechanisms & Policies
Separate policy from mechanism
– policy: what will be done
– mechanism: how to do it
Example: CPU protection
– mechanism: timer
– policy: timer period
Flexibility
Micro-kernels vs. monoliths
OSes: 3. OS Structs 24
6.3. Implementation
OSes: 3. OS Structs 25