The JX Operating System Michael Golm Meik Felser, Christian Wawersich, Jürgen Kleinöder University of Erlangen-Nürnberg Department of Computer Science (Distributed Systems and Operating Systems) Martensstraße 1 91058 Erlangen, Germany golm@cs.fau.de
A Dancing Bear This is a "dancing bear" paper -- it’s not how well the bear dances, but that it dances at all. And this bear dances. Anonymous Reviewer The JX Operating System 1
Outline ■ Motivation ■ JX Architecture ◆ Protection domains ◆ Communication mechanism ◆ The Microkernel ■ System-level programming in Java ■ Performance The JX Operating System 2
Why another OS? Motivation Abstraction levels in software engineering Assembler portability productivity robustness C portability productivity robustness Smalltalk, Java, C# The JX Operating System 3
Why another OS? Motivation Abstraction levels in software engineering Assembler portability productivity robustness C portability productivity ? robustness Smalltalk, Java, C# ? Applications Operating Systems The JX Operating System 4
Typical System Structure Motivation Application Application Middleware (JVM, RMI, CORBA,...) OS Kernel (Unix,...) Hardware The JX Operating System 5
Typical System Structure Motivation Application JVM Unix Hardware The JX Operating System 6
Typical System Structure Motivation Application File Object Java Native Interface JVM File Descriptor System Call Interface File System Unix Disk Driver Hardware Interface Hardware The JX Operating System 7
The Way to a new Architecture Motivation Application File Object Java Native Interface JVM File Descriptor System Call Interface File System Unix Disk Driver Hardware Interface Hardware The JX Operating System 8
The Way to a new Architecture Motivation Application File System Device Driver File System File Object Disk Driver JVM File Descriptor System Call Interface File System OS Kernel ( µ Kernel) Disk Driver Hardware Interface Hardware The JX Operating System 9
The Way to a new Architecture Motivation Application File System Device Driver File System File Object Disk Driver JVM ( w/o native methods ) File Descriptor System Call Interface File System OS Kernel ( µ Kernel) Disk Driver Hardware Interface Hardware The JX Operating System 10
The Way to a new Architecture Motivation Application File System Device Driver File System File Object Disk Driver JVM ( w/o native methods ) File Descriptor File System OS Kernel ( µ Kernel) Disk Driver Hardware Interface Hardware The JX Operating System 11
The JX Operating System Application File System Device Driver File System File Object Disk Driver JX ( µ Kernel) Hardware Interface Hardware The JX Operating System 12
The JX Operating System Architecture Application File System Device Driver File System File Object Disk Driver JVM JVM JVM JX ( µ Kernel) Hardware Interface Hardware The JX Operating System 13
The JX Operating System Architecture Application File System Device Driver File System File Object Disk Driver virtual JVM virtual JVM virtual JVM JX ( µ Kernel) Hardware Interface Hardware The JX Operating System 14
Protection Domains Architecture Domain Domain Domain virtual JVM virtual JVM virtual JVM JX ( µ Kernel) Hardware Interface Hardware The JX Operating System 15
Protection Domains Architecture Classes Classes Domain Threads Components Heap Domain JX ( µ Kernel) Hardware Interface Hardware The JX Operating System 16
Communication: Portals Architecture Service Heap Heap Components Components Threads Threads Domain Domain JX ( µ Kernel) Hardware Interface Hardware The JX Operating System 17
Communication: Portals Architecture Service Implementation Heap Heap Interface Components Components Threads Threads Domain Domain JX ( µ Kernel) Hardware Interface Hardware The JX Operating System 18
Communication: Portals Architecture Service Implementation Heap Heap Interface Components Components Service-Thread Threads Threads Domain Domain JX ( µ Kernel) Hardware Interface Hardware The JX Operating System 19
Communication: Portals Architecture Service Portal Implementation Heap Heap Interface Components Components Service-Thread Threads Threads Domain Domain JX ( µ Kernel) Hardware Interface Hardware The JX Operating System 20
Communication: Portals Architecture Service Portal Implementation Heap Heap Interface Interface Components Components Service-Thread Threads Threads Domain Domain JX ( µ Kernel) Hardware Interface Hardware The JX Operating System 21
Communication: Portals Architecture Service Portal Implementation Heap Heap Interface Interface Components Components Service-Thread Client-Thread Threads Threads Domain Domain JX ( µ Kernel) Hardware Interface Hardware The JX Operating System 22
Protection Domains Architecture ■ Each domain has its own heap ◆ no shared objects ➔ no accounting problems (memory, GC time) ◆ no GC dependencies ➔ no scalability problems ◆ explicit application boundaries ➔ confinement ■ Each domain has its own threads ◆ no migrating threads ➔ no domain termination problems ■ Each domain has its own code ◆ no trusted code ➔ improved security The JX Operating System 23
The Microkernel Architecture Domain Domain Domain virtual JVM virtual JVM virtual JVM domain Java-level Java-level Memory management collector garbage collector scheduler Manager scheduler copying portal preemptive Domain garbage round-robin invocation Manager collector scheduler JX mark&sweep memory non-preemptive Naming garbage management round-robin collector scheduler component garbage collector low-level management support framework CPU management monitoring Runtime System DomainZero Portals Hardware Interface Hardware The JX Operating System 24
The Microkernel Architecture Domain Domain Domain Domain DomainZero domain Java-level Java-level Memory management collector garbage collector scheduler Manager scheduler copying preemptive portal Domain garbage round-robin invocation Manager collector scheduler mark&sweep memory non-preemptive Naming garbage management round-robin collector scheduler component garbage collector low-level management support framework CPU management monitoring Runtime System Portals The JX Operating System 25
Outline ■ Motivation ■ JX Architecture ◆ Protection domains ◆ Communication mechanism ◆ The Microkernel ■ System-level programming in Java ■ Performance The JX Operating System 26
System-level Programming in Java Application File System Device Driver File System File Object Disk Driver JX Hardware Interface Hardware The JX Operating System 27
System-level Programming in Java ■ Problems ◆ Management of large memory, registers, and on-device memory ◆ Interrupt handlers The JX Operating System 28
System-level Programming in Java ■ Problems ◆ Management of large memory, registers, and on-device memory ◆ Interrupt handlers ■ Requirement ◆ No changes to the language or bytecode instruction set The JX Operating System 29
Memory ■ Manage large memory areas ◆ disk blocks, network buffers, ... ■ Access special memory areas ◆ video memory, device registers, ... ■ Disadvantages of arrays: ◆ no explicit interface ◆ no specializations possible ◆ located on heap, can be moved (DMA!) ◆ can only be passed by copying The JX Operating System 30
Memory Portals ■ Explicit interface ■ Can be subtyped ■ Can be used to access arbitrary memory areas ■ Can be treated specially by the translator ■ Share data between domains ■ Pass subranges to other domains ■ Revoke access The JX Operating System 31
Fast Portals ■ Execute in caller context (caller thread/domain) ■ Can only be created by DomainZero ■ Portal object contains special data not directly accessible from the Java level The JX Operating System 32
Fast Portals ■ Execute in caller context (caller thread/domain) ■ Can only be created by DomainZero ■ Portal object contains special data not directly accessible from the Java level ■ Example: Memory portal Client Domain DomainZero memoryManager.alloc(...) heap The JX Operating System 33
Fast Portals ■ Execute in caller context (caller thread/domain) ■ Can only be created by DomainZero ■ Portal object contains special data not directly accessible from the Java level ■ Example: Memory portal Client Domain DomainZero memoryManager.alloc(...) allocate memory memory area heap The JX Operating System 34
Fast Portals ■ Execute in caller context (caller thread/domain) ■ Can only be created by DomainZero ■ Portal object contains special data not directly accessible from the Java level ■ Example: Memory portal Client Domain DomainZero memoryManager.alloc(...) copy portal to client allocate memory mem size ... memory area heap The JX Operating System 35
Recommend
More recommend