120 likes | 284 Views
THE SPRING NUCLEUS: A MICROKERNEL FOR OBJECTS. M. Hamilton and P. Kougiouris Sun Microsystems Laboratories. INTRODUCTION. Spring is a microkernel OS with two components executing in kernel mode The virtual memory manager The microkernel itself ( nucleus ) Paper focuses on fast IPC
E N D
THE SPRING NUCLEUS:A MICROKERNEL FOR OBJECTS M. Hamilton and P. Kougiouris Sun Microsystems Laboratories
INTRODUCTION • Spring is a microkernel OS with two components executing in kernel mode • The virtual memory manager • The microkernel itself (nucleus) • Paper focuses on fast IPC • Efficient scheduling of cross-domain calls • Efficient parameter passing
Spring IPC Model • Spring provides to its users: • Secure access to services: through kernel-managed capabilities • Easy recovery in the presence of client or server crashes • A highly efficient IPC mechanismparticularly when the number of arguments is small
DOORS (I) • Basic IPC mechanism in Spring • Can be passed between domains • Associated with each door are • The address of an entry point in the target domain and • An integer datum that can specify an individual object in the target domain
DOORS (II) • Each domain has a table of doors to which the domain has access • These door tickets or capabilities are stored inside the nucleus • Doors are destroyed when no domain can access them • Spring maintains a reference count for each door in each domain
Spring Thread Model (I) • Spring treats the thread issuing a cross-domain call and all downstream threads as a single scheduling entity Domain Domain Kernel
Spring Thread Model (II) • Merging these threads into a single thread would cause problems: • When target domain is on another machine • When calling domain wants to suspend a thread • Best solution is to create a new scheduling entity: the shuttle
SHUTTLES • Single scheduling entities grouping all threads that are involved in a cross-domain call • Applications can explicitly create pools of server threads • Whenever the nucleus executes a cross-domain call, it tries to find an idle thread within the target domain
Error Handling • Failures of target domains return an error code to the calling thread • Failures of calling threads result in the propagation downstream of an alert bit • Failures of threads in the middle of a call chain crashes break the call chain into two distinct shuttles
Door Invocation • Three implementations : • Fast path: when all arguments total less than 16 bytes: registers are masked instead of being saved • Vanilla path:the default • Bulk path:uses Spring’s virtual memory servicesfor large amounts of page-aligned data
PERFORMANCE • Cross-domain call times are • One sixth of those of Mach and Windows NT • 60% of those of Taos LRPC • Less than 2% of those achieved by Berkeley sockets
MY COMMENTS • Good systems always optimize for the most frequent case Systems should always be correct and should be efficient when it matters