Application Performance & Flexibility on Exokernel Systems paper review
-
Upload
vimukthi-wickramasinghe -
Category
Engineering
-
view
104 -
download
2
Transcript of Application Performance & Flexibility on Exokernel Systems paper review
![Page 1: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/1.jpg)
OS Structurewith Research Paper Discussion
Presented by Vimukthi Wickramasinghe & Sameera Nelson
![Page 2: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/2.jpg)
Overview
• Introduction to operating systems structure
• Layered OS structure
• Some alternative OS structures
• “Application Performance and Flexibility on Exokernel
Systems” paper discussion
![Page 3: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/3.jpg)
Introduction to OS structureAn operating system is a complex beast.
![Page 4: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/4.jpg)
Introduction to OS structure
• An OS needs to have a good structure.
• Traditional Unix OS which had a
monolithic structure - bad
• Monolithic Unix kernel makes it hard to
implement and maintain.
![Page 5: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/5.jpg)
Layered OS structure
Problems with monolithic approach gave way to layered
approach.
Advantages Disadvantages
Simplicity of construction Difficulty in appropriately defining the various layers
Ease of debugging Tend to be less efficient than other types
Layers are independent of implementation details of others
![Page 6: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/6.jpg)
Some Alternative OS Structures
• Microkernel approach
• Modular kernel approach
• Exokernel approach
![Page 7: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/7.jpg)
Application Performance & Flexibility on Exokernel Systems
*
• Principles of exokernels
• Xok, an exokernel for Intel x86-based computers
• XN - Xok storage system
• Performance comparisons
• Conclusion
• Q & A
![Page 8: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/8.jpg)
Principles of Exokernels
• Separate protection and management
• Expose allocation
• Expose names
• Expose revocation
• Expose information
*
![Page 9: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/9.jpg)
• Library operating systems.
• “Unix as a library”
• Can implement traditional OS abstraction.
• Most application programs can choose the LibOS.
• Unprivileged libraries – can be modified or replaced at will.
• Different libOSes can coexist on the top of same exokernel.
*
LibOSs
![Page 10: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/10.jpg)
*
Microkernel Vs Exokernel
![Page 11: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/11.jpg)
*
Xok
Xok is an exokernel for Intel x86-based computers.
• Can safely multiplex resources on x86 based systems.
• Allows efficient and powerful virtual memory abstractions to be built at
the application level.
• Wake up predicates can be injected to the kernel.
• Provides access control through hierarchical named capabilities.
![Page 12: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/12.jpg)
• Xok’s 3 design techniques:
● Access control on all resources is uniform.
● Bind hardware together with software abstractions.
● Allow downloaded code where necessary.
*
Xok : Protected Abstractions
![Page 13: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/13.jpg)
LibOSs can maintain invariants in shared abstractions,
• Software regions
• Hierarchically-named capabilities
• Wake-up predicates
• Robust critical sections
Three levels of trust in determining what optimizations can be used,
• Mutual trust
• Unidirectional trust
• Mutual distrust*
Xok : Protected Sharing
![Page 14: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/14.jpg)
• ExOS is Xok’s default library.
• Much code borrowed from OpenBSD.
*
EXOS
![Page 15: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/15.jpg)
• Multiple library file systems (libFSes) in each libOS
• Four requirements to allow libFS file management
● Creating new file formats should not require any special privilege
● LibFSes should be able to safely share blocks at the raw disk block level
● Storage system should be efficient
● Storage system should facilitate cache sharing among distinct libFSes.
Stable Storage System
*
![Page 16: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/16.jpg)
Stable Storage System
*
VS
![Page 17: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/17.jpg)
• Access to stable storage at the level of disk blocks.
• Efficiently determine the access rights to a given disk block.
• Prevent a malicious user from claiming another user’s disk blocks as part of her
own files
• XN uses Untrusted Deterministic Functions(UDF)
• C-FFS (Co-locating fast file system) is ExOS’s default file system.
*
XN : Xok Storage System
![Page 18: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/18.jpg)
*
XN : UsageType creation The libFS describes its types by storing templates.
LibFS persistence To ensure that libFS data is persistent across reboots, a libFS can register the root of its tree
in XN’s root catalogue.
Startup libFS loads its root(s) and any types it needs from the root catalogue into the buffer cache
registry.
Read 1) libFS creates entries in the registry.
2) libFS initiates a read request
Allocate A libFS selects blocks to allocate by reading XN’s map of free blocks.
Write A libFS writes dirty blocks to disk by passing the blocks to write to XN
Deallocate XN uses UDFs to check deallocate operations analogously to allocate operations.
![Page 19: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/19.jpg)
• Performance Comparison
• Performance Evaluation
• Invisible Optimisation
• Performance Evaluation
• Cheetah HTTP Server
• Global Performance
• Exokernel : Advantages/ Drawbacks/ Lessons
• Conclusion*
Topics Ahead ...
![Page 20: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/20.jpg)
• Configuration, 200-MHz Intel Pentium Pro, 64MB of memory
• E2E application performance on Xok vs 4.4 BSD UNIX Systems
(FreeBSD & OpenBSD)
• Usage of C-FFS to Xok & OPenBSD
• Reported times are the minimum time of ten trials
• Xok/ExOS vs OpenBSD/C-FFS, vs OpenBSD, FreeBSD
*
Performance Comparison
![Page 21: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/21.jpg)
*
Performance Comparison
![Page 22: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/22.jpg)
Unmodified UNIX applications:
*
Better
Comparable
Performance Evaluation
![Page 23: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/23.jpg)
Unmodified UNIX applications
● Applications perform comparably or significantly better at a
speed of up to 4x on Xok/ExOS than BSD UNIXes.
● Performance of 8/11 applications are comparable to BSD
Unixes.
● On 3 applications (pax, cp, diff) Xok/ExOS runs considerably
faster. *
Performance Evaluation
![Page 24: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/24.jpg)
Modified Andrew Benchmark
• Difference in performance on MAB is less profound
● MAB stresses in fork(), expensive function in Xok
● Due to not sharing page tables
● Take 6 ms, freeBSD < 1 ms
• Xok leads in I/O intensive benchmark *
Invisible Optimisation
Xok/ExOS
OpenBSD/C-FFS
OpenBSD FreeBSD
TIme (s) 11.5 12.5 14.2 11.5
![Page 25: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/25.jpg)
Modified UNIX applications
• Fast Simple Binary Emulation
● Emulator replaces system calls to procedure calls in to ExOS
• XCP : A zero touch file copy system
● Eliminate data touching by CPU, 3X faster
● Improvements - Prefetching, SUny reads/Writes, disk restructuring
• The Cheetah Http Server *
Performance Evaluation 2
![Page 26: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/26.jpg)
Modified UNIX applications
• HTTP server - Finds the appropriate document, sends it.
• Developed upon extensible I/O library(XIO) for fast servers
• Customized FS & TCP implementation for the properties of HTTP
traffic.
• I/O centric nature of servers, OS based optimizations profitable.
*
Cheetah HTTP Server
![Page 27: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/27.jpg)
• Performs 8X faster than the best UNIX HTTP server.
• Exokernel is well suited to building fast servers
*
Cheetah HTTP Server
![Page 28: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/28.jpg)
• Merged File Cache and Retransmission Pool
● Avoid in memory data touching
● Data transmitted to client directly, from file cache.
• Knowledge-based Packet Merging
● Use knowledge of per-request state transitions to reduce number of I/O actions.
• HTML-based File Grouping
Co-locates files included in HTML by allocating them in adjacent disk blocks, HTTP
throughput improved by up to a factor of two
Cheetah HTTP Server, How ...
File Cache
Client
![Page 29: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/29.jpg)
• Performance Comparison
• Performance Evaluation
• Invisible Optimisation
• Cheetah HTTP Server
• Global Performance
• Exokernel : Advantages/ Drawbacks/ Lessons
• Conclusion*
Topics Ahead ...
![Page 30: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/30.jpg)
• Run multiple applications concurrently
• Exokernel Architecture is potentially weak
• Not extensively studied
• FreeBSD performs better than openBSD, due to small non-unified
buffer cache
• Challenge in Xok, Not to enforce global policies, but to deriving
information needed to decide enforcement. *
Global Performance
![Page 31: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/31.jpg)
Exposing kernel data structures
• Can be accessed without system call overhead
• Flexibility
• libOSes can be modified and debugged than kernels
• Edit, compile, debug cycle is faster than “edit, compile, reboot, debug”
cycle of kernel.
• Performance *
Exokernel : Advantages
![Page 32: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/32.jpg)
*
Exokernel : Advantages
The CPU Interface
• Combination of time slots
• Initiation/termination of upcalls
• Direct Yields has proven the value
• Global gang scheduling
• Robust critical section
Libraries are simple than kernels
![Page 33: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/33.jpg)
• Interface design is not simple, multiple designs over several years
• Ease of creation/mixing libOSes lead to code messes, maintenance
issues
• Information loss, Implementing OS abstractions in application level
• Self-paging is difficult, paging can be caused by external entities
*
Exokernel : Drawbacks
![Page 34: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/34.jpg)
• Fast apps not required good microbenchmark performance
• Inexpensive critical section
• User level page tables are complex
• Downloaded interrupt handlers are questionable
• Downloaded code is powerful
*
Exokernel : Lessons
![Page 35: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/35.jpg)
Exokernel Architecture
• Goal: safe application control of all resources.
• How: by separating resource management from protection.
Results found promising
• Unmodified applications run same or 4x better.
• Customized applications can run up to 8x better.
• Global performance is similarly good like UNIX.*
Conclusion
![Page 36: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/36.jpg)
*
Q & A ...
![Page 37: Application Performance & Flexibility on Exokernel Systems paper review](https://reader036.fdocuments.net/reader036/viewer/2022062406/55ba9a08bb61eb4d268b461e/html5/thumbnails/37.jpg)
*
Thank You