210 likes | 322 Views
Presentation by Omar Abu-Azzah. Roadmap. The Problem. SPIN ’s solution. SPIN ’S architecture. Performance. Conclusion. http://cs.nyu.edu/rgrimm/teaching/sp05-os/020105.pdf. SPIN Solution. Put extension code in the kernel Low communication overhead Rely on language safety features.
E N D
Presentation by Omar Abu-Azzah
Roadmap • The Problem. • SPIN’s solution. • SPIN’S architecture. • Performance. • Conclusion.
SPIN Solution • Put extension code in the kernel • Low communication overhead • Rely on language safety features. • Static type checking and dynamic linking. • Event driven kernel.
Modula-3 • OO language designed in early 1990’s. • Separation of interface and implementation. • Protection: members which are exported at the interface are only accessible. • Strongly typed. • Garbage collection. • Other features: • Objects, generic interfaces, threads, exceptions.
SPIN: Safety • Capabilities • A pointer. • Unforgeable reference to objects. • system object e.g. physical page • Interface e.g. physical page allocation interface. • collection of interfaces e.g. entire VM system. • Compile time type checking for safe assignment and dereferencing. • Can be passed to user level (externalized reference)
SPIN: Safety • Protection domains • Naming and protection interface is at language-level. • Domain: • An object. • Contains one or more safe object files. • Controls dynamic binding. • Operations: Create, Resolve, Combine. • Module must create domain to export its interface through in-kernel nameserver.
SPIN: Extensibility • Extensions can: • Monitor system activity. • Offer hints to the system. • Replace existing system service. • Event driven: • System services are done by event handling. • Extension is installation of new handler. • Dispatcher routes events to handlers.
SPIN: Extensibility • Event • The signature of a procedure. • Raising an event is calling the function. • Handler • Registration: • Dispatcher.InstallHandler (event-name, guard, handler) • Handling is executing the procedure. • Default handler: allow, deny, guard new handler. • Multiple handlers: cooperatively. • Synchronously, asynchronous, bounded time.
SPIN: Extensibility • Guard • A predicate evaluated when an event arrives. • Can also be specified by the handler.
SPIN: Core Services • Extensible memory management • Provides three objects: • Physical address. • Virtual address • Translation • What is passed/returned?
SPIN: Core Services • Extensible thread management • No thread model for applications in SPIN. • Strand object provided and can be scheduled. • Safety: Kernel handles synchronization and binding of strands to processors using M-3 threads. • Thread package defines an implementation of the strand interface. • Strand interface: • Block and unblock • Checkpoint and resume
SPIN: Performance • Comparison with Mach and OSF/1. • Reasonable and realistic examples presented: • TCP/IP, network video system, http server. • Protected communication is significantly cheaper. • Thread implementation and virtual memory management perform favorably.
Conclusion • Good performance can be achieved in an extensible system without compromising safety. • Flexibility. • Relies on Modula-3. • Trusts the compiler.
References • "Extensibility, Safety and Performance in the SPIN Operating System" by Brian Bershad, et al, in Proceedings of the 15th ACM Symposium on Operating System Principles (SOSP-15), Copper Mountain, CO. pp. 267--284. • Extensibility: SPIN and exokernels. Grimm, Robert. New York University. Class slides. Available: http://cs.nyu.edu/rgrimm/teaching/sp05-os/020105.pdf • The SPIN OS. http://www.cs.wisc.edu/~sschang/OS-Qual/kernel/SPIN.htm • Related Work in Adaptive Operating Systems. Available: http://www.cse.ogi.edu/DISC/projects/synthetix/related.html • Brewer, Eric A. Spin Leading OS Research Astray? January 2004. Available: http://www.cs.berkeley.edu/~brewer/cs262b/Lec-Spin.pdf • Modula-3: Language definition. Available: http://www.cs.tut.fi/lintula/manual/modula3/m3defn/html/m3.html