DOC PREVIEW
CORNELL CS 614 - Operating System Kernels

This preview shows page 1-2-3-4-25-26-27-52-53-54-55 out of 55 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Operating System KernelsSummary of First PaperSummary of Second PaperMicrokernelsMonolithic and Micro-kernelsMicrokernels: ProContext SwitchesMicrokernel: ConPaper GoalsMore Paper GoalsThe L4 MicrokernelThe L4 Microkernel (continued)L4LinuxL4Linux (continued)L4Linux – System CallsA note on TLBsMicrokernel Cons RevisitedPerformance – CompatibilityPerformance – The CompetitorsPerformance – BenchmarksPerformance - MicrobenchmarksPerformance - MacrobenchmarksSlide 23Performance – AnalysisSo What?Microkernel Con: Revisited AgainFlux OSThe Flux OSKitAdapting Existing CodeSeparating OS ComponentsOSKitDiagram of OSKitExample OS using OSKitAnother Example OSOSKit ComponentsMore OSKit ComponentsEven More OSKit ComponentsTwo more OSKit ComponentsOSKit Component InterfacesOSKit ImplementationProviding SeparabilityGlue CodeWhat is this “glue code”?More “glue code”InterfacesExecution EnvironmentSlide 47Exposing the ImplementationEncapsulating Legacy CodeThe Obligatory BenchmarkBandwidth AnalysisLatencyCase Study 2: Standard MLOther language based OSsOSKit vs. MicrokernelOperating System KernelsPeter SirokmanSummary of First PaperThe Performance of µ-Kernel-Based Systems (Hartig et al. 16th SOSP, Oct 1997)Evaluates the L4 microkernel as a basis for a full operating systemPorts Linux to run on top of L4 and compares performance to native Linux and Linux running on the Mach microkernelExplores the extensibility of the L4 microkernelSummary of Second PaperThe Flux OSKit: A Substrate for Kernel and Language Research (Ford et al. 16th SOSP, 1997)Describes a set of OS components designed to be used to build custom operating systemsIncludes existing code simply using “glue code”Describes projects that have successfully used the OSKitMicrokernelsAn operating system kernel that provides minimal servicesUsually has some concept of threads or processes, address spaces, and interprocess communication (IPC)Might not have a file system, device drivers, or network stackMonolithic and Micro-kernelsMicrokernels: ProFlexibility: allows multiple choices for any service not implemented in the microkernelModular design, easier to change Stability: Smaller kernel means it is easier to debugUser level services can be restarted if they failMore memory protectionContext SwitchesMicrokernel: ConPerformanceRequires more context switchesEach “system call” must switch to the kernel and then to another user level processContext switches are expensiveState must be saved and restoredTLB is flushedPaper GoalsIs it possible to build an OS on a Microkernel that performs well?Goal is to prove that it isPort Linux to run on top of L4 (a microkernel)Compare performance of L4Linux to native LinuxSince L4Linux is a “complete” operating system, it is representative of microkernel operating systemsMore Paper GoalsIs this actually useful? Is the microkernel extensible?Implemented a second memory manager optimized for real-time applications to run alongside Linux on L4Implemented an alternative IPC for applications that used L4 directly (requires modifying the application)The L4 MicrokernelOperations:The kernel starts with one address space, which is essentially physical memoryA process can grant, map, or unmap pages of size 2n from its own virtual address spaceSome user level processes are pagers and do memory management (and possibly virtual memory) for other processes using these primitives.The L4 Microkernel (continued)Provides communication between address spaces (inter-process communication or IPC)Page faults and interrupts are forwarded by the kernel to the user process responsible for them (i.e. pagers and device drivers)On an exception, the kernel transfers control back to the thread’s own exception handlerL4LinuxLinux source has two cleanly separated partsArchitecture dependentArchitecture independentIn L4Linux Architecture dependent code is replaced by L4Architecture independent part is unchangedL4 not specifically modified to support LinuxL4Linux (continued)Linux kernel as L4 user serviceRuns as an L4 thread in a single L4 address spaceCreates L4 threads for its user processesMaps parts of its address space to user process threads (using L4 primitives)Acts as pager thread for its user threadsHas its own logical page tableMultiplexes its own single thread (to avoid having to change Linux source code)L4Linux – System CallsThe statically linked and the shared C libraries are modifiedSystem calls in the library call the kernel using L4 IPCFor unmodified native Linux applications there is a “trampoline”The application traps to the kernel as normalThe kernel bounces control to a user-level exception handlerThe handler calls the modified shared libraryA note on TLBsTranslation Lookaside Buffer (TLB) caches page table lookupsOn context switch, TLB needs to be flushed A tagged TLB tags each entry with an address space label, avoiding flushesA Pentium CPU can emulate a tagged TLB for small address spacesMicrokernel Cons RevisitedA significant portion of the performance penalty of using a microkernel comes from the added work to reload the page table into the TLB on every context switchSince L4 runs in a small address space, it runs with a simulated tagged TLBThus, the TLB is not flushed on every context switchNote that some pages will still be evicted – but not as manyPerformance – CompatibilityL4Linux is binary compatible with native Linux from the applications point of view.Performance – The CompetitorsMach 3.0 A “first generation” microkernelDeveloped at CMUOriginally had the BSD kernel inside itL4A “second generation” microkernelDesigned from scratchPerformance – BenchmarksCompared the following systemsNative LinuxL4LinuxMkLinux (in-kernel)Linux ported to run inside the Mach microkernelMkLinux (user)Linux ported to run as a user process on top of the Mach microkernelPerformance - MicrobenchmarksPerformance - MacrobenchmarksAIM Benchmark Suite VII simulates “different application loads” using “Load Mix Modeling”.Paper does not say which “Mix” was used Could not find reference for AIM Benchmark Suite VIIPerformance - MacrobenchmarksPerformance – AnalysisL4Linux is 5% - 10% slower than native for


View Full Document

CORNELL CS 614 - Operating System Kernels

Documents in this Course
Load more
Download Operating System Kernels
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Operating System Kernels and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Operating System Kernels 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?