Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell...

20
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: •Jon Udell •Peter D. Varhol •Dick Pountain

Transcript of Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell...

Chorus and other Microkernels

Presented by:

Jonathan Tanner and Brian Doyle

Articles By:

•Jon Udell

•Peter D. Varhol

•Dick Pountain

What is a Microkernel?

• Provides IPC, Scheduling, Real-Time Events and Memory Management

• All else is a service which can be plugged in as an external module at run-time.

Monolithic vs. Micro

Scheduler

Memory Manager

IPC

Device Drivers

File System

Monolithic

SchedulerMemory Manager

IPC

Real-Time Events

•Microkernel

Device Drivers File System

Windows NT Micro or no?

• Has Core Kernel Size

• All Modules ARE NOT simply user level

• Security, I/O and others run in Executive Mode.

Win NT Kernel

Scheduler

Memory Manager

IPC

Security

File System

Kernel Space

Executive / Privileged Space

User Level Space

I/O

Netscape

The Chorus Microkernel

• Aspirations of a New Operating System– Multitasking

– Networking

– Fault Tolerance

– Symmetric Multiprocessing

– Massive Parallelism

– Binary Compatibility with Industry Standard Software

– Object Oriented Design

The Chorus Microkernel

• Chorus Systems are built on a tiny nucleus (typically only 50-60 Kbytes in size vs. Monolithic which can be 400 Kbytes or more) which includes.– Scheduling

– Memory Management

– Real-Time Events

– Communications

Chorus Lexicon

• Actor - The Equivalent of a Unix process; it provides an execution context for one or more threads.

• Ports - Queues attached to actors by which threads of one actor send messages to threads of another.

• Site - The basic unit of computing hardware, consisting of one or more processors, memory, and I/O devices.

• Thread - The unit of execution in Chorus. It has the same meaning as it does in Windows NT. A Thread does not need a private address space but does need its own stack. Under Chorus the Actor owns the address space.

Chorus Microkernel

Communication Medium

threadsthread

s

ports

Actors

Site Site

The Chorus Microkernel

• Multitasking Real-Time Executive– Allocates Local Processors

– Schedules Threads Using Priority-Based Preemptive Scheme

– Optional Time-Slicing

– API for Thread Creation/Destruction

– Synchronization via Semaphores, Spin Locks, and Mutexes.

• Chorus Philosophy - Provide a variety of efficient low-level mechanisms, leaving the choice of performance trade-offs to the sub-system builder.

The Chorus Microkernel

• The Memory Manager– Offers Segments and Regions

– The virtual address space of an actor is divided into contiguous regions that map a portion of a segment into physical memory.

– System actors called “Mappers” manage segments, allocating regions as needed.

The Chorus Microkernel

• The Supervisor– Dispatches Interrupts, Exceptions and Traps.

– These events are dispatched to dynamically defined device drivers and other real-time event handlers at run time.

– Response time is fast enough for Chorus to be applied to real-time control systems.

The Chorus Microkernel

• The Interprocess Communications (IPC)– Delivers messages between ports

– Two Communication Modes• Simple, non-blocking, asynchronous send/receive protocol in

which messages are not acknowledged.

• RPC (Remote Procedure Call) with full client/server semantics.

The Chorus Microkernel

• Above the Kernel - Everything else in the OS is a server. (Operating in User Mode or Kernel Mode)– File Managers

– Stream and Socket Managers

– Device Drivers

– Unix System V

The Chorus Microkernel

• The ability to support conventional Operating Systems as Sub-Systems means you could develop “Multiple Personalities”– OS/2

– Unix

– Windows

• IBM is basing its future OS strategy on a similar idea, implementing it on the Mach-3.0 microkernel.

Chorus Systems Unix

• A Trend in OS Development - Restructuring of traditional “monolithic” operating systems into independent servers.

– Primary Concerns• Efficiency: Can a microkernel-based modular operating

system provide performance comparable to that of the monolithic kernel.

• Compatibility: Portability, Standardization and Compatible Interfaces are needed for applications as well as device drivers and streams modules.

Chorus Systems Unix

• Supervisor Actors: – Share the supervisor address space.

– Can execute in kernel mode.

– Are truly separate entities from the nucleus; compiled, linked and loaded independently.

– Utilize privileged instructions and connected handlers.

• Connected Handlers:– Created dynamically by Supervisor Actors to catch hardware

interrupts, system call traps, and program exceptions.– Allows for a common interface for the nucleus.

– Interrupt processing time is greatly reduced, allowing real-time applications to be implemented outside the nucleus.

Chorus Systems Unix

• Chorus Unix - Split into four servers: (Supervisor Actors)– Process Manager: A Unix process was implemented by

the Chorus Actor.

– File Manager

– Device Manager

– Socket Manager

• Unix System Calls - Implemented by a process-level library.

Chorus Systems Unix

• Some Early Problems– Unix Signals: Mono-threaded actors used

priority messages.– Device Drivers: Needed to reside within the

kernel.

Chorus Systems Unix

• Experience Gained: Implementing a rich operating system environment such as Unix provides insight into the basic operating system services that a microkernel must provide.– Supervisor Actors

– Threads

– Connected Handlers