Nucleus
Overview
- Goal: to suit diverse requirements of program scheduling and resource allocation.
- A fundamental set of primitives allows the dynamic creation and control of a hierarchy of processes as well as the communication among them.
- Micro kernel
3 parts of the nucleus
- Processes
- Processes Communication
Process Hierarchy
Parent process can start, stop, remove its own children.
External process
- About the device (I/O…)
Peripheral -- device
- Document -- file/data
Process Commnunication (internal processes)
- Nucleus administers a common pool of message buffering and a message queue for each process.
- send message (receiver, message, buffer),
- wait message (sender, message, buffer),
- delays the requesting procee until an message arrives in its queue.
- send answer (result, answer, buffer),
- wait answer (result, answer, buffer)
- delays the requesting procee until an answer arrives in a given buffer.
Synchronization
Message Passing
- Message passing is key to some models of concurrency and object-oriented programming.
Pros: don't mess up with each other.
- Cons: less efficient (need to copy and copy)