The JX Operating System Michael Golm Meik Felser, Christian - - PowerPoint PPT Presentation

the jx operating system
SMART_READER_LITE
LIVE PREVIEW

The JX Operating System Michael Golm Meik Felser, Christian - - PowerPoint PPT Presentation

The JX Operating System Michael Golm Meik Felser, Christian Wawersich, Jrgen Kleinder University of Erlangen-Nrnberg Department of Computer Science (Distributed Systems and Operating Systems) Martensstrae 1 91058 Erlangen, Germany


slide-1
SLIDE 1

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

slide-2
SLIDE 2

The JX Operating System

1

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

slide-3
SLIDE 3

The JX Operating System

2

Outline

■ Motivation ■ JX Architecture

◆ Protection domains ◆ Communication mechanism ◆ The Microkernel

■ System-level programming in Java ■ Performance

slide-4
SLIDE 4

The JX Operating System

3

Motivation

Why another OS?

Abstraction levels in software engineering

Assembler C Smalltalk, Java, C#

portability productivity robustness portability productivity robustness

slide-5
SLIDE 5

The JX Operating System

4

Motivation

Why another OS?

Abstraction levels in software engineering

Assembler C Smalltalk, Java, C#

portability productivity robustness portability productivity robustness ? ?

Operating Systems Applications

slide-6
SLIDE 6

The JX Operating System

5

Motivation

Typical System Structure

Application Application OS Kernel (Unix,...) Middleware (JVM, RMI, CORBA,...) Hardware

slide-7
SLIDE 7

The JX Operating System

6

Motivation

Typical System Structure

Application Unix JVM Hardware

slide-8
SLIDE 8

The JX Operating System

7

Motivation

Typical System Structure

Application Unix JVM Hardware

File System Disk Driver System Call Interface Java Native Interface Hardware Interface File Descriptor File Object

slide-9
SLIDE 9

The JX Operating System

8

Motivation

The Way to a new Architecture

Application Unix JVM Hardware

File System Disk Driver System Call Interface Java Native Interface Hardware Interface File Descriptor File Object

slide-10
SLIDE 10

The JX Operating System

9

Motivation

The Way to a new Architecture

OS Kernel (µKernel) JVM Hardware

File System Disk Driver System Call Interface Hardware Interface File Descriptor

Application

File Object

File System

Device Driver

Disk Driver File System

slide-11
SLIDE 11

The JX Operating System

10

Motivation

The Way to a new Architecture

OS Kernel (µKernel) JVM (w/o native methods) Hardware

File System Disk Driver System Call Interface Hardware Interface File Descriptor

Application

File Object

File System

Device Driver

Disk Driver File System

slide-12
SLIDE 12

The JX Operating System

11

Motivation

The Way to a new Architecture

Application OS Kernel (µKernel) JVM (w/o native methods) Hardware

File System Disk Driver Hardware Interface File Descriptor File Object

File System

Device Driver

Disk Driver File System

slide-13
SLIDE 13

The JX Operating System

12

The JX Operating System

Application

Hardware Interface File Object

File System

Device Driver

Disk Driver File System

JX (µKernel) Hardware

slide-14
SLIDE 14

The JX Operating System

13

Architecture

The JX Operating System

Application

Hardware Interface File Object

File System

Device Driver

Disk Driver File System

JVM JVM JVM JX (µKernel) Hardware

slide-15
SLIDE 15

The JX Operating System

14

Architecture

The JX Operating System

Application

Hardware Interface File Object

File System

Device Driver

Disk Driver File System

virtual JVM virtual JVM virtual JVM JX (µKernel) Hardware

slide-16
SLIDE 16

The JX Operating System

15

Architecture

Protection Domains

Domain Domain

Domain

virtual JVM virtual JVM virtual JVM JX (µKernel)

Hardware Interface

Hardware

slide-17
SLIDE 17

The JX Operating System

16

Architecture

Protection Domains

Hardware

Hardware Interface

Domain

JX (µKernel) Domain

Heap Components Classes Classes Threads

slide-18
SLIDE 18

The JX Operating System

17

Architecture

Communication: Portals

Domain Hardware

Hardware Interface

JX (µKernel) Domain

Heap Threads Components Heap Threads Components

Service

slide-19
SLIDE 19

The JX Operating System

18

Architecture

Communication: Portals

Domain Hardware

Hardware Interface

JX (µKernel) Domain

Heap Threads Components

Interface Implementation

Heap Threads Components

Service

slide-20
SLIDE 20

The JX Operating System

19

Architecture

Communication: Portals

Domain Hardware

Hardware Interface

JX (µKernel) Domain

Heap Threads Components

Interface Implementation

Heap Threads Components

Service Service-Thread

slide-21
SLIDE 21

The JX Operating System

20

Architecture

Communication: Portals

Domain Hardware

Hardware Interface

JX (µKernel) Domain

Heap Threads Components

Interface Implementation

Heap Threads Components

Portal Service Service-Thread

slide-22
SLIDE 22

The JX Operating System

21

Architecture

Communication: Portals

Domain Hardware

Hardware Interface

JX (µKernel) Domain

Heap Threads Components

Interface Implementation

Heap Threads Components

Interface Portal Service Service-Thread

slide-23
SLIDE 23

The JX Operating System

22

Architecture

Communication: Portals

Domain Hardware

Hardware Interface

JX (µKernel) Domain

Heap Threads Components

Interface Implementation

Heap Threads Components

Interface Portal Service Client-Thread Service-Thread

slide-24
SLIDE 24

The JX Operating System

23

Architecture

Protection Domains

■ 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

slide-25
SLIDE 25

The JX Operating System

24

Architecture

The Microkernel

Hardware

Hardware Interface

Java-level scheduler domain management garbage collector scheduler Naming DomainZero Portals Runtime System Memory Manager Domain Manager monitoring low-level CPU management copying garbage collector mark&sweep garbage collector portal invocation memory management component management Java-level collector preemptive round-robin scheduler non-preemptive round-robin scheduler garbage collector support framework

JX Domain Domain

Domain

virtual JVM virtual JVM virtual JVM

slide-26
SLIDE 26

The JX Operating System

25

Architecture

The Microkernel

Java-level scheduler domain management garbage collector scheduler Naming Portals Runtime System Memory Manager Domain Manager monitoring low-level CPU management copying garbage collector mark&sweep garbage collector portal invocation memory management component management Java-level collector preemptive round-robin scheduler non-preemptive round-robin scheduler garbage collector support framework

Domain Domain Domain Domain

DomainZero

slide-27
SLIDE 27

The JX Operating System

26

Outline

■ Motivation ■ JX Architecture

◆ Protection domains ◆ Communication mechanism ◆ The Microkernel

■ System-level programming in Java ■ Performance

slide-28
SLIDE 28

The JX Operating System

27

System-level Programming in Java

Application Hardware

Hardware Interface File Object

File System

Device Driver

Disk Driver File System

JX

slide-29
SLIDE 29

The JX Operating System

28

System-level Programming in Java

■ Problems

◆ Management of large memory, registers, and on-device memory ◆ Interrupt handlers

slide-30
SLIDE 30

The JX Operating System

29

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

slide-31
SLIDE 31

The JX Operating System

30

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

slide-32
SLIDE 32

The JX Operating System

31

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

slide-33
SLIDE 33

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

slide-34
SLIDE 34

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

heap

memoryManager.alloc(...)

slide-35
SLIDE 35

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

heap memory area

memoryManager.alloc(...) allocate memory

slide-36
SLIDE 36

The JX Operating System

35

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

heap mem size ... memory area

memoryManager.alloc(...) copy portal to client allocate memory

slide-37
SLIDE 37

The JX Operating System

36

Interrupt Handler

■ Interrupts handled in own thread with interrupts disabled

◆ must not run in endless loop ➔ verifier ◆ must not invoke portals except fast portals ◆ must synchronize with other threads without blocking ▲ AtomicVariable

  • setValue(...), unblock(...) used in interrupt thread
  • blockIfEqual(...) used outside interrupt thread

➔ Single Producer / Single Consumer Queue

slide-38
SLIDE 38

The JX Operating System

37

System-level Programming in Java

Device Driver Domain

Heap

DRAM Registers, On-device memory

AtomicVariable Threads IRQ-Thread

slide-39
SLIDE 39

The JX Operating System

38

System-level Programming in Java

Device Driver Domain

Heap

DRAM Registers, On-device memory

AtomicVariable Threads IRQ-Thread

Heap

slide-40
SLIDE 40

The JX Operating System

39

System-level Programming in Java

Device Driver Domain

Heap

DRAM Registers, On-device memory

Memory AtomicVariable Threads IRQ-Thread

Heap Memory

slide-41
SLIDE 41

The JX Operating System

40

System-level Programming in Java

Device Driver Domain

Heap

DRAM Registers, On-device memory

Memory DeviceMemory AtomicVariable Threads IRQ-Thread

Heap Memory

slide-42
SLIDE 42

The JX Operating System

41

Outline

■ Motivation ■ JX Architecture

◆ Protection domains ◆ Communication mechanism ◆ The Microkernel

■ System-level programming in Java ■ Performance

◆ IOZONE ◆ NFS

slide-43
SLIDE 43

The JX Operating System

42

Performance

IOZone: Multi-domain Config

80 160 240 320 400 480 560

filesize in KBytes throughput in MBytes/sec 4 8 16 32 64 128 256 512

80 160 240 320 400 480 560

filesize in KBytes throughput in MBytes/sec 4 8 16 32 64 128 256 512

4 8 16 32 64 128 256 512 record size in KBytes 4 8 16 32 64 128 256 512 record size in KBytes

Filesystem

FS ext2FS Buffer BlockIO

BlockProvider

BlockIO IDE

IOZone

FS iozone DomainZero

Linux JX

slide-44
SLIDE 44

The JX Operating System

43

Performance

IOZone: Multi-domain Config

10 20 30 40 50 60 70 80 90 100 filesize in KBytes achieved throughput in percent 4 8 16 32 64 128 256 512

4 8 16 32 64 128 256 512 record size in KBytes

Filesystem

FS ext2FS Buffer BlockIO

BlockProvider

BlockIO IDE

IOZone

FS iozone DomainZero

JX vs. Linux %

slide-45
SLIDE 45

The JX Operating System

44

Performance

IOZone: Single-domain Config

10 20 30 40 50 60 70 80 90 100 filesize in KBytes achieved throughput in percent 4 8 16 32 64 128 256 512

4 8 16 32 64 128 256 512 record size in KBytes

Filesystem

FS ext2FS Buffer BlockIO

BlockProvider

BlockIO IDE

IOZone

FS iozone DomainZero

JX vs. Linux %

slide-46
SLIDE 46

The JX Operating System

45

Performance

IOZone: Single-domain Config

4 8 16 32 64 128 256 512 record size in KBytes

Filesystem

FS ext2FS Buffer BlockIO

BlockProvider

BlockIO IDE

IOZone

FS iozone DomainZero

Running without safety checks %

5 10 15 filesize in KBytes

improvement in percent

4 8 16 32 64 128 256 512

slide-47
SLIDE 47

The JX Operating System

46

Performance

NFS: getattr request rate

1000 2000 3000 4000 5000 6000 7000 2 4 6 8 10 request/second Time in seconds JX Linux (kernel NFS) Linux (user NFS)

slide-48
SLIDE 48

The JX Operating System

47

Performance

NFS: getattr request rate

Idle 0.1 DomainZero:InitialThread 0.3 SVC-jx/zero/BootFS 0.4 SVC-jx/zero/ComponentManager 0.5 SVC-jx/zero/DebugSupport 0.6 SVC-jx/zero/DomainManager 0.7 SVC-jx/zero/DebugSupport 0.8 SVC-jx/zero/Naming 0.9 Init-main 1.2 GC 2.1 NFS-main 2.2 jx/devices/pci/PCIGod 2.3 timerpc/StartTimer 2.4 jx/net/StartNetDevice 2.5 jx/net/protocols/StartNetworkProtocols 2.6 test/fs/IDEDomain 2.7 FSDomain-Main 2.8 test/nfs/NFSDomain 2.9 SVC-jx/devices/pci/PCIAccess 2.10 TimerManager 2.11 IRQThread8 2.12 SVC-jx/timer/TimerManager 2.13 IRQThread11 2.14 IDE-2nd-IRQ ide0 2.15 IDE-2nd-IRQ ide1 2.16 IRQThread14 2.17 SVC-jx/devices/net/NetworkDevice 2.18 Etherpacket-Queue 2.19 SVC-jx/net/NetInit 2.20 RPC-Receiver 2.21 SVC-bioide/Partition 2.23 SVC-jx/fs/FS 2.24 SVC-jx/fs/FileSystem 2.25 MountProc 2.26 NFSProc 2.27 RPCBind 2.28

2 4 6 8 10 12 14 16 18 20 22 Time in Seconds

slide-49
SLIDE 49

The JX Operating System

48

Performance

NFS: getattr request rate

Idle 0.1 DomainZero:InitialThread 0.3 SVC-jx/zero/BootFS 0.4 SVC-jx/zero/ComponentManager 0.5 SVC-jx/zero/DebugSupport 0.6 SVC-jx/zero/DomainManager 0.7 SVC-jx/zero/DebugSupport 0.8 SVC-jx/zero/Naming 0.9 Init-main 1.2 GC 2.1 NFS-main 2.2 jx/devices/pci/PCIGod 2.3 timerpc/StartTimer 2.4 jx/net/StartNetDevice 2.5 jx/net/protocols/StartNetworkProtocols 2.6 test/fs/IDEDomain 2.7 FSDomain-Main 2.8 test/nfs/NFSDomain 2.9 SVC-jx/devices/pci/PCIAccess 2.10 TimerManager 2.11 IRQThread8 2.12 SVC-jx/timer/TimerManager 2.13 IRQThread11 2.14 IDE-2nd-IRQ ide0 2.15 IDE-2nd-IRQ ide1 2.16 IRQThread14 2.17 SVC-jx/devices/net/NetworkDevice 2.18 Etherpacket-Queue 2.19 SVC-jx/net/NetInit 2.20 RPC-Receiver 2.21 SVC-bioide/Partition 2.23 SVC-jx/fs/FS 2.24 SVC-jx/fs/FileSystem 2.25 MountProc 2.26 NFSProc 2.27 RPCBind 2.28

2 4 6 8 10 12 14 16 18 20 22 Time in Seconds

slide-50
SLIDE 50

The JX Operating System

49

Performance

NFS: getattr request rate

Idle 0.1 DomainZero:InitialThread 0.3 SVC-jx/zero/BootFS 0.4 SVC-jx/zero/ComponentManager 0.5 SVC-jx/zero/DebugSupport 0.6 SVC-jx/zero/DomainManager 0.7 SVC-jx/zero/DebugSupport 0.8 SVC-jx/zero/Naming 0.9 Init-main 1.2 GC 2.1 NFS-main 2.2 jx/devices/pci/PCIGod 2.3 timerpc/StartTimer 2.4 jx/net/StartNetDevice 2.5 jx/net/protocols/StartNetworkProtocols 2.6 test/fs/IDEDomain 2.7 FSDomain-Main 2.8 test/nfs/NFSDomain 2.9 SVC-jx/devices/pci/PCIAccess 2.10 TimerManager 2.11 IRQThread8 2.12 SVC-jx/timer/TimerManager 2.13 IRQThread11 2.14 IDE-2nd-IRQ ide0 2.15 IDE-2nd-IRQ ide1 2.16 IRQThread14 2.17 SVC-jx/devices/net/NetworkDevice 2.18 Etherpacket-Queue 2.19 SVC-jx/net/NetInit 2.20 RPC-Receiver 2.21 SVC-bioide/Partition 2.23 SVC-jx/fs/FS 2.24 SVC-jx/fs/FileSystem 2.25 MountProc 2.26 NFSProc 2.27 RPCBind 2.28

2 4 6 8 10 12 14 16 18 20 22 Time in Seconds

slide-51
SLIDE 51

The JX Operating System

50

Performance

NFS: getattr request rate

Idle 0.1 DomainZero:InitialThread 0.3 SVC-jx/zero/BootFS 0.4 SVC-jx/zero/ComponentManager 0.5 SVC-jx/zero/DebugSupport 0.6 SVC-jx/zero/DomainManager 0.7 SVC-jx/zero/DebugSupport 0.8 SVC-jx/zero/Naming 0.9 Init-main 1.2 GC 2.1 NFS-main 2.2 jx/devices/pci/PCIGod 2.3 timerpc/StartTimer 2.4 jx/net/StartNetDevice 2.5 jx/net/protocols/StartNetworkProtocols 2.6 test/fs/IDEDomain 2.7 FSDomain-Main 2.8 test/nfs/NFSDomain 2.9 SVC-jx/devices/pci/PCIAccess 2.10 TimerManager 2.11 IRQThread8 2.12 SVC-jx/timer/TimerManager 2.13 IRQThread11 2.14 IDE-2nd-IRQ ide0 2.15 IDE-2nd-IRQ ide1 2.16 IRQThread14 2.17 SVC-jx/devices/net/NetworkDevice 2.18 Etherpacket-Queue 2.19 SVC-jx/net/NetInit 2.20 RPC-Receiver 2.21 SVC-bioide/Partition 2.23 SVC-jx/fs/FS 2.24 SVC-jx/fs/FileSystem 2.25 MountProc 2.26 NFSProc 2.27 RPCBind 2.28

2 4 6 8 10 12 14 16 18 20 22 Time in Seconds

slide-52
SLIDE 52

The JX Operating System

51

Conclusion

■ It is possible to build an OS based on type-safe protection

◆ Isolation of protection domains ◆ System-level programming without language extensions

■ OS takes advantage of advanced language technology

◆ Increased robustness of system components ◆ Modular system ◆ Flexibility in system configuration ◆ Extensibility using domains

■ Performance is sufficient for most applications ➔ http://www4.cs.fau.de/Projects/JX