Operating System Organization

Goals

Last Time: Modularity & Abstraction

Hard modularity

Client Service Organization

Message passing diagram demonstrating modularity
Client-ServiceFunction
Request Call
Response Return
Example code:
Pros and cons

Virtualizable Processors

An visual representation of an application's view of hardware through virtual instructions and ordinary instructions

Virtualizable processors layer the OS on top of the hardware to provide a filtered view of the hardware to the application. They let the OS take control of execution whenever the client code does anything "suspicious" and run at full speed otherwise.
Note: Running at full speed increases complexity and power usage which is a good tradeoff for desktops but not for embedded devices.

Suspicious behavior (privileged instructions)

Abstraction - a good set of virtual instructions.
Mechanism - how to do it?

Virtual instructions (OS API is based on this)
VM == real hardware (another approach)

Ordinary vs Privileged Instructions

User Code Access

DeviceAmount of Access
ALU Full Access
General Purpose Registers Full Access
Privileged Registers Limited Access
Primary Memory (RAM) Full Access to user Memory (decided by OS)
Cache Invisible to user (mirrors RAM)
I/O No Access with a few exceptions (must use syscalls)
Time Usually full access but occasional exceptions

An exception to restricted user I/O access includes software that requires extensive graphics such as video games, where performance is key.

New concept : Process