The Composite Component- Based Operating System Gabriel Parmer - - PowerPoint PPT Presentation

the composite component based operating system
SMART_READER_LITE
LIVE PREVIEW

The Composite Component- Based Operating System Gabriel Parmer - - PowerPoint PPT Presentation

UMBC Guest Lecture The Composite Component- Based Operating System Gabriel Parmer Computer Science Dept The George Washington University aka. Gabe Discussion encouraged... Please stop me at any moment Let me know if you haven't yet


slide-1
SLIDE 1

UMBC Guest Lecture

The Composite Component- Based Operating System

Gabriel Parmer

Computer Science Dept The George Washington University

  • aka. Gabe
slide-2
SLIDE 2

Discussion encouraged...

  • Please stop me at any moment
  • Let me know if you haven't yet learned

something or don't know a term

  • Questions, questions, questions!
slide-3
SLIDE 3

Today

  • What is a component-based operating system?
  • A design study of one of the most important

mechanisms

slide-4
SLIDE 4

System Structure

  • System Structure: How different software parts

1) Are separated from each other (Why?) 2) Communicate

  • How does a system separate software using
  • dual mode
  • virtual address spaces
  • Implications on
  • Security/Reliability
  • What are some common system structures?
slide-5
SLIDE 5

Monolithic System Structure

Word Browser Excel Operating System (File System, Networking, Memory Mgmt, Scheduling, ...) Hardware (CPU, Memory, Peripherals – hard drive, NIC, GPU) Kernel

  • most trusted
  • must work

“User-Level” System Call

  • pen(...)
  • Includes Unix/Windows/OSX

Dual mode protection? Virtual address spaces?

slide-6
SLIDE 6

Monolithic System Structure

Word Browser Excel Operating System (File System, Networking, Memory Mgmt, Scheduling, ...) Hardware (CPU, Memory, Peripherals – hard drive, NIC, GPU) Kernel

  • most trusted
  • must work

“User-Level” System Call

  • pen(...)
  • Includes Unix/Windows/OSX

Windows 95 Windows 98 Windows XP Windows Vista 10 20 30 40 50 60 Millions of Lines

  • f Code

When's the last time you tried to get 50 MLOC to work???

slide-7
SLIDE 7

Microkernel System Structure

  • Moves functionality from the kernel to “user” space
  • Communication takes place between user servers

using inter-process communication (IPC)

  • Benefits:
  • Easier to add functionality
  • More reliable (why?)
  • More secure (why?)
  • Down-sides???

App File System Memory Management Networking User level Kernel level

  • pen(...)

IPC <10 KLOC

slide-8
SLIDE 8

Component-Based OS

  • Component:

– unit of functionality that exports an interface – uses other component's interfaces – User-level – separate virtual addr space

  • Interface: Set of typed functions
  • Even low-level functionality implemented in

components

– Scheduling, memory management, device drivers

  • Kernel is minimal: not even scheduling!!!
  • IPC for component communication
slide-9
SLIDE 9
slide-10
SLIDE 10
  • vs. Microkernel?
  • Microkernel:

– Put subsystems at user-level – Networking, File system, etc... – Focus: Separate a normal system into servers

  • Component-Based system

– Break system into small chunks of functionality – Glue together specific components specific to the

goals of the system: customizability

– Focus: Break system into small functionalities

slide-11
SLIDE 11

IPC Implementation

  • High frequency of “inter-process

communication”

– “inter-component communication” – Must be fast!!!

  • What are the minimal hardware operations

required to get a message from C0 to C1?

– user/kernel and virtual addr space switches?

  • How many thread switches?

– Assuming separate threads per component

slide-12
SLIDE 12

IPC Implementation II

  • Asynchronous communication: UNIX Pipes
  • C0: write(p1, buf0, sz); r = read(p2, buf0, sz)

C1: read(p1, buf1, sz); r1 = write(p2, buf1, sz)

  • Hardware operations?
  • Thread switches?
slide-13
SLIDE 13

IPC Implementation III

  • Synchronous IPC – like function calls!

C0: int foo(){return bar();} C1: int bar(){return 1;}

  • Hardware operations?
  • Thread switches? Assumptions?
slide-14
SLIDE 14

IPC Implementation IV

  • Synchronous IPC between threads

C0: call(C1,buf,sz) C1: recv(C0,buf,sz); reply_recv(C0,buf,sz)

  • Hardware operations?
  • Thread switches? Assumptions?
slide-15
SLIDE 15

IPC Implementation V

  • What is a thread?
  • Synchronous IPC – thread migration

C0: foo() {return bar();} C1: bar() {return 1;}

  • No thread switches – same “schedulable entity”
  • Hardware operations?
slide-16
SLIDE 16

Composite CBOS

  • See

http://www.seas.gwu.edu/~gparmer/projects/composite/

  • Github repository for source code

– We're accepting outside contributions! – TODO list in doc/ – smallish tasks

slide-17
SLIDE 17

Virtual Machines I

  • Do you know what these are?
  • What is the structure of VMs?
slide-18
SLIDE 18

Virtual Machines II

  • A virtual machine host (the kernel) provides an

interface identical to the underlying bare hardware

  • Other guest kernels execute in user-mode
  • The API for virtual machines is a copy of the

machine!

slide-19
SLIDE 19

Virtual Machines III

(a) non-virtual machine (b) virtual machine

Non-virtual Machine Virtual Machine System call hypercall identical

slide-20
SLIDE 20

Virtual Machine: Benefits

  • Fundamentally, multiple operating systems

share the same hardware

  • Protected from each other
  • Some sharing of files
  • Communicate with each other via networking
  • Useful for development, testing
  • Consolidation of many low-resource use

systems onto fewer busier systems