The Nuclear of a Multiprogramming System
The RC 4000 Multiprogramming System is a discontinued operating system developed for the RC 4000 minicomputer in 1969. It is historically notable for being the first attempt to break down an operating system into a group of interacting programs communicating via a message passing kernel.
Goal
- Nucleus tries to make things general and flexible, by provide basic primitives, which enabled operator to customize their OS which different pager, scheduler etc.
- General VS Specific
- Make things more specific, ex MAC OS, ASIC tailed for that application, efficient
Terminology
- internal process == process(in execution)
- program == job, program, file
- External Process == I/O of a given document identified by a unique process name
- document : collection of data stored on physical medium == data
- peripheral device == 外围设备,打印机etc
Structure
2 layers of the system
- nucleus
- processes
3 parts of the nucleus: process, scheduling, communication=synchronization
- A set of primitives in Nucleus allows the creation, control and removal of internal process
- parent process can load a program into a child process and start it
- process have freedom to choose their own strategy of program scheduling
- program loading and swaping are not part of the nucleus
- Parent process can start, stop, remove its own children
process hierarchy(?)
parent process have complete control over child processes
- general tools for the design of operating system with parent and child process
- virtual machine : support multiple OS at once
server consolidation. virtual machine allows migrate from one physical machine to another
XEN(?)
Communication (Internal Processes)
- Nucleus administers a common pool of message buffering and a message queue for each process.
- server
- wait message (sender, message, buffer)
- delays the requesting procee until an message arrives in its queue.wait message
- send answer
- copies an answer into a buffer in which a message has been received
- delivers it in the queue of origin sender
- wait message (sender, message, buffer)
- client: send message, call wait answer once I need the data
- send message (receiver, message, buffer)
- copies a message into the first available buffer within the pool
- put it in the queue of a named server
- wait answer (result, answer, buffer)
- delays the requesting procee until an answer arrives in a given buffer
- copy the answer into the process, return buffer to the pool
- send message (receiver, message, buffer)
Message VS shared memory
- Message passing
- more reliable, less likely to induce bugs and data races
- have a limited message buffer overhead
- Shared memory
- easy to mess up(overflow, data race, security issue)
- but more efficient, no need to wait.\
(*)Question: What do THE and Nucleus use to coordinate processes?
THE: explicit synchronization statements(P, V primitives)
Nucleus: message passing
(*)Question: What are the trade-offs?
THE : lock and unlock operations operating on binary semaphores
- pro: whether certain requirements are met or not can be proved
- ("the harmonious co-operation of a set of such sequential processes can be established by discrete reasoning").
- con: hard to program, assuming that no malicious or buggy programs
Nucleus : message
- pro
- robust against malicious and buggy programs
- "The semaphore concept alone does not fulfill our requirements of safety and efficiency in a dynamic environment which some processes may turn out to be the black sheep and break the rule of the game"
- "This is doen by storing the identity of the sender and receiver in each buffer and checking it whenever a process attempts to send or wait for an answer in a given buffer"
- dynamic
- process do not need to have general knowledge of the existence of other process
- robust against malicious and buggy programs
- con: higher overhead, pools contains a finite number of buffers