Hints for Computer System Design Paper by B. W. Lampson Presentation by Emerson Murphy-Hill.

Slides:



Advertisements
Similar presentations
Remus: High Availability via Asynchronous Virtual Machine Replication
Advertisements

Travis McVey, Diego Velasquez, Mark Whylie, Drem Darios, Elroy Ashtian Jr.
3: OS Structures 1 OPERATING SYSTEM STRUCTURES PROCESS MANAGEMENT A process is a program in execution: (A program is passive, a process active.) A process.
G Robert Grimm New York University Extensibility: SPIN and exokernels.
Dawson R. Engler, M. Frans Kaashoek, and James O'Tool Jr.
G Robert Grimm New York University Extensibility: SPIN and exokernels.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
2: OS Structures 1 Jerry Breecher OPERATING SYSTEMS STRUCTURES.
Memory Management 2010.
Microkernels: Mach and L4
Computer Organization and Architecture
Exokernel: An Operating System Architecture for Application-Level Resource Management Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr. M.I.T.
User-Level Interprocess Communication for Shared Memory Multiprocessors Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented.
CS533 Concepts of OS Class 16 ExoKernel by Constantia Tryman.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Secure Operating System Architectures Patterns
Stack Management Each process/thread has two stacks  Kernel stack  User stack Stack pointer changes when exiting/entering the kernel Q: Why is this necessary?
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Networked File System CS Introduction to Operating Systems.
APPLICATION PERFORMANCE AND FLEXIBILITY ON EXOKERNEL SYSTEMS M. F. Kaashoek, D. R. Engler, G. R. Ganger H. M. Briceño, R. Hunt, D. Mazières, T. Pinckney,
CS533 Concepts of Operating Systems Jonathan Walpole.
CS533 Concepts of Operating Systems Jonathan Walpole.
Copyright © Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Advanced Operating Systems Lecture.
Virtual Machine Monitors: Technology and Trends Jonathan Kaldor CS614 / F07.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
CE Operating Systems Lecture 20 Disk I/O. Overview of lecture In this lecture we will look at: Disk Structure Disk Scheduling Disk Management Swap-Space.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview Part 2: History (continued)
The Performance of Microkernel-Based Systems
Operating Systems Lecture 7 OS Potpourri Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Hints for Computer System Design
Processes Introduction to Operating Systems: Module 3.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Lecture 5 Page 1 CS 111 Online Processes CS 111 On-Line MS Program Operating Systems Peter Reiher.
Lecture 26 Virtual Machine Monitors. Virtual Machines Goal: run an guest OS over an host OS Who has done this? Why might it be useful? Examples: Vmware,
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
1 Why Threads are a Bad Idea (for most purposes) based on a presentation by John Ousterhout Sun Microsystems Laboratories Threads!
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
1.3 Operating system services An operating system provide services to programs and to the users of the program. It provides an environment for the execution.
The Structuring of Systems Using Upcalls By David D. Clark Presented by Samuel Moffatt.
The Structuring of Systems Using Upcalls David D. Clark (Presented by John McCall)
Introduction to Operating Systems Concepts
Paper Discussions Karthik Dantu Steve Ko.
Virtual Machine Monitors
Modularity Most useful abstractions an OS wants to offer can’t be directly realized by hardware Modularity is one technique the OS uses to provide better.
Kernel Design & Implementation
CS 6560: Operating Systems Design
Session 3 Memory Management
Mechanism: Address Translation
Chapter 2: System Structures
Advanced Operating Systems Lecture notes
Chapter 9 – Real Memory Organization and Management
Operating System Structure
KERNEL ARCHITECTURE.
EECS 582 Midterm Review Mosharaf Chowdhury EECS 582 – F16.
Introduction to Operating Systems
Page Replacement.
Chapter 2: System Structures
Overview Continuation from Monday (File system implementation)
Chapter 2: Operating-System Structures
Prof. Leonardo Mostarda University of Camerino
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
System calls….. C-program->POSIX call
Chapter 2: Operating-System Structures
Xen and the Art of Virtualization
Mechanism: Address Translation
In Today’s Class.. General Kernel Responsibilities Kernel Organization
Presentation transcript:

Hints for Computer System Design Paper by B. W. Lampson Presentation by Emerson Murphy-Hill

Some Background B.W. Lampson – same guy who wrote “Experience with Processes and Monitors in Mesa” Currently at Microsoft Worked on hardware, operating systems, programming environments, and applications Here he presents a laundry list of folk wisdom for system design

26 Pieces of Advice

Separate Normal and Worst Case Normal case must be fast, but worst case must still work Specialization. Special code generated for best case, “replugging” for worst case

Do One Thing At a Time, Well Capture the minimum possible interface, deliver what the interface promised, don’t promise too much Exokernel. The minimum possible abstraction, only promises resource protection.

Don’t Generalize Don’t try to anticipate all possible uses of interface (no general implementation) Microkernels. Interface built generally, but few assumptions made about implementation

Get It Right As Dick Cheney would say, this is “non-actionable intelligence” and fall into the class of “known unknowns” Abstraction does not imply correctness

Don’t Hide Power When low level is high performance, don’t mask it in abstraction Scheduler Activations. Rather than kernel multiplexing threads across processors, have user space decide how to allocate a processor

Use Procedure Arguments Pass code as a parameter Asynchronous I/O. Function callback used as parameter, rather than doing some sort of generic lookup upon return.

Leave it to the Client Attain flexibility and performance by “doing one thing,” letting the client do the rest Monitors. Provide synchronization as a language-level construct, but leave protecting resources to client

Keep Basic Interfaces Stable Avoid changing the interface out from under client Trampoline. To maintain Linux binary compatibility, sys calls are trampoline’d into user space event handler

Keep a Place to Stand If you have to change the interface, keep backward compatibility Virtual Machines. Rather than building OS on top of raw hardware, building on top of virtual machine allows VM implementation to be changed

Plan to Throw One Away Throw away the first version of the system, and start over Interestingly, we didn’t see an example of this. Some of the most worthwhile research papers are systems have failed

Keep Secrets In other words, encapsulation. Layers. Each layer contains state that is private from other layers.

Use Good Design Again Rather than being general, use a good idea multiple times Variations on Cache. TLB, L1+L2, virtual memory, file system cache, disk controller, hierarchical RAID…

Divided and Conquer Take a complex problem and split it up into easier ones Threading. A number of threads can be used to do a number of subtasks.

Shed Load Don’t try to handle all requests, eliminate some Web servers. Rather than try to serve all requests, deny some. Apache does this by putting an upper limit on number of threads

Safety First Avoid disaster over attaining optimal results High level languages. Programmer doesn’t have to worry about type safety and array bounds checking, for example (at a performance cost)

Split Resources Divide up resources, rather than scheduling them. Scheduler Activations. Rather than multiplexing across processors, have one user level thread per processor.

Static Analysis Analyze code without running it, wherever possible Deadlock/Race detection (Sun’s lock_lint). As we have seen dynamic race detection is dependent on system entering all states.

Dynamic Translation Translate/compile code when needed Packet filtering / collocation (Exokernel). Code is interpreted in kernel when needed (runtime) to run in kernel-mode.

Cache Answers Don’t recompute or fetch, when possible Virtual memory. Acts as a cache to hold frequently used pieces of memory.

Use Hints System may provide a hint as to desired results, or where desired results may be found URPC. Calling process will provide a hint to the kernel as to where its processor should next be allocated (server)

Use Brute Force If an elegant solution is not possible, fall back on a long calculation Specialization/RPC variants. Both do something clever when possible, but do the standard thing when not possible

Compute In Background If work is not immediately necessary, do it during downtime Cleanup in log-based file systems. Segment cleaning could be scheduled for nighttime.

Batch Processing Amortize cost by doing a bunch of operations at once Page Protection. In VMM systems, we’ve seen that protecting/unprotecting multiple pages is faster

End-to-end Error detection and recovery is not strictly necessary at all levels, but only for performance. Layers. Error detection could be handled at any layer… really depends on the application

Log Updates Periodically record and backup the state of a system, and be able to recover Log-based file systems. RAID 5 in Elephant, too.

Make Actions Atomic Either have operations complete or fail without residue RCU. Changes are seen as atomic to all processes.

Summary Make it simple Do one thing well Easiest thing possible Delegate work Tackle one aspect only Be consistent

References mpson/ mpson/ reason.blogspot.com/2004_06_20_t he-age-of-reason_archive.htmlhttp://the-age-of- reason.blogspot.com/2004_06_20_t he-age-of-reason_archive.html