CSE221 - lec01: Historical Perspectives: THE & Nucleus
date
Oct 8, 2024
slug
cse221-lec01
status
Published
tags
System
summary
type
Post
01 - Historical Perspectives: THE & Nucleus
The Structure of the “THE” Multiprogramming System
The Goals of the THE Multiprogramming System
- Reduce turn-around time (time between submitted and completed) for short program
- Efficient resouce usage (hardware resources such as cpu, devices, memory)
- Soundness wrt. both design and implementation
- Manage the complexity of the system, which is important for the previous goal for soundness.
Approach used to achieve the goals
The main idea is to building abstractions layer by layer. The whole system is a society of cooperated sequential processes, with synchronization mechanism. The processes at different level implement different abstractions.
- Level 0 - CPU Allocation: handle the clock interrupt and process scheduling. on top of layer 0 the processors shared lost their identities.
- Level 1 - Segment Controller(Memory Management): do the book-keeping stuffs related to virtual memory. Above this level other processes can use segment id instead of physical address to refer to an information unit.
- Level 2 - Message Interpreter(Console Management, virtualizing console I/O device): take care of the allocation of the console keyboard via which the operator communicate with higher-level processes. Above this level the actual physical console keyboard lost its identity.
- Level 3 - I/O Buffering / Un-buffering (Communication with peripherals): manage the communication with devices
- Level 4 - User Program
- Level 5 - Operator
Comments on layered-structure and program verification
The author mentioned the importance of the layered-structure in the process of verifying the design and implementation of the system.
The layered-structure help to manage the complexity of the system, so they could test the system layer by layer, which makes it possible to test and debug such complex system using relatively limiting resources.
Synchronization via semarphore
Two usage:
- Mutex
- Private Semarphore: like conditional variable today
Deadlock prevention
- by leveraging the process hierarchy. High level process will only wait for low level process but the reverse direction is not true.
Summary & take-away
- Layered OS Design
- Abstraction of Sequential Process
- Synchronization via semarphore
- Goal for correctness (easy for program verification)
Additional Notes: Layered OS today
Linux:
- User Layer
- User-Kernel Interface
- Kernel Layer
Windows:
- Apps
- Win32 Sub System
- User-Kernel Interface
- Kernel
- HAL (Hardware Abstraction Layer)
Additional Notes: Hardware Trends
ㅤ | 1968 | 2024 | factor of Improv. |
clock speed | 400KHZ | 3GHZ | 7500x |
Memory Capacity | 32KB | 16GB | 500000x |
Storage | 512KB | 10TB | 20,000,000x |
Storage Revolution Time | 40ms | 8ms | 5x |
Some hardware improves dramatically while some improves not that much(storage acess).
The Nucleus of a Multiprogramming System
The Goals of the Nucleus
- extensibility
- flexibility
Components of System Nucleus
- Fundamental Process Control
- IPC via Message Buffering
- Interrupt, exceptions handling
- Scheduling
Components of OSes on top of Nucleus
- Scheduling
- High-level Process Control
- Memory Management
Economy of Abstractions
Process & Message
- Process
- Internal: normal program execution
- External: wrap hardware devices by process and access them in the way you access process
- Message
- buffer management
- synchronization
Summary & take-away
- flexible & extensible OS design
- The idea of System Nucleus, and layer OSes on top of it.
- Synchronization via Message Passing
- Small Number of Abstractions