Introduction We study a system CS 4410 What is a system? What is a system? interconnections components “A complex unit formed of many often “A complex unit formed of many often diverse parts subject to a common plan diverse parts subject to a common plan or serving a common purpose” or serving a common purpose” Webster Third New International Dictionary Webster Third New International Dictionary a certain behavior at the interface with an environment “A set of interconnected components with an expected behavior observed at the interface with its environment”
Common systems Propagation of effects challenges Redesign wheel well Redesign trunk for bigger spare wheel Emergent properties Move back seat Propagation of effects slightly forward Thin back seat Incommensurate scaling Stiffen rear springs To improve ride experience, Change speedometer change wheels from 14” to 16” Trade-offs gearing … Propagation of effects: Incommensurate scaling fighting malaria As the system increases in size or WHO sprayed villages in N. Borneo with DDT speed, not all components can manage the scale, and things break down Wiped out mosquitos, but… Roaches collected DDT in tissue 10x higher than Jack! Lizard ate roaches, and became slower but also 10x wider and thicker! About 1000x Jack’s weight — but Easy target for cats their cross section of their bones was only 100x Jack’s DDT cause cats to die A human thigh bone breaks at about 10x human weight Forest rats moved into villages The giant would have broken his thighs Rats carried the bacillus of the plague! every time he was taking a step! On being the right size J.B.S. Haldane
How to Manage Inevitable Trade-offs Complexity Modularity Speed vs power in processors Good modularity minimizes 5 (not implemented) User connections between components 4 Bandwidth vs computation in compression User Programs Abstraction 3 I/O Management Separate interface from 2 Operator Console Space vs time almost everywhere internals; separate specification Memory 1 from implementation Management A pawn vs better position in chess Hierarchy/Layering CPU Scheduling 0 and Semaphores Constrain interactions so they Hardware … are easier to understand THE Operating system EWD 196, 1965 OS wears many hats What is an OS? Referee Manages shared resources: An Operating System implements a virtual CPU, memory, disks, networks, machine whose interface is more convenient* displays, cameras… that the raw hardware interface Illusionist Look! Infinite memory! Your Application Application Application Application Application VM own private processor! OS Interface Interface Operating System Glue Physical Machine Interface Hardware Offers a set of common services (e.g., UI routines) * easier to use, simpler to code, more reliable, more secure... Separates apps from I/O devices
OS as Referee OS as Illusionist Resource allocation Appearance of resources not physically present Multiple concurrent tasks, how does OS decide who Virtualization gets how much? Application Application Application Application Application VM Processor, memory, Isolation Interface Operating System screen space, disk, A faulty app should not disrupt other apps or OS network Hardware Communication/Coordination Apps need to coordinate and share state OS as Illusionist OS as Illusionist Appearance of resources not physically present Appearance of resources not physically present Virtualization Atomic operations Application Application Application Application Application VM Processor, memory, HW guarantees atomicity at the word level… Interface Operating System screen space, disk, What happens during concurrent updates to complex data network Hardware structures? The entire computer What is a computer crashes while writing a file block? Fooling the OS itself! At the hardware level, packets are lost Application Application Application Application Application VM Eases debugging, Reliable communication channels Interface Guest OS 1 Guest OS 2 portability, isolation VMM VM Interface Hardware
OS as Glue Offers standard services to simplify app design and facilitate sharing What will the Send/Receive byte streams course be like? Read/Write files Pass messages Share memory UI Decouples HW and app development
Painting Building OS * Order Reliability Design Availability Tension Portability Balance Efficiency Harmony Security * Sondheim: Sunday in the Park with George More Issues in OS Issues in OS Design Design Structure: how is the OS organized? Reliability: how do we deal with failures?? Concurrency: how are parallel activities created Portability: how to write once, run anywhere? and controlled? Extensibility: how do we add new features? Sharing: how are resources shared? Communication: how do we exchange information? Naming: how are resources named by users? Protection: how are distrusting parties protected Scale: what happens as demands increase? from each other? Persistence: how do we make information outlast Security: how to authenticate, authorize, and the processes that created it? ensure privacy? Accounting: who pays the bill and how do we Performance: how to make it fast? control resource usage?
Recommend
More recommend