jx - a flexible java operating system · jx - a flexible java operating system ... compatible file...

1
University of Erlangen-Nuremberg Department of Computer Science JX - A flexible Java Operating System © 2002 JX-Team Michael Golm Meik Felser Christian Wawersich Jürgen Kleinöder Hardware Java-level scheduler domain management scheduler Naming DomainZero Portals Runtime System Memory Domain Manager monitoring low-level CPU management copying garbage collector mark&swep garbage collector portal invocation memory management component management conservative collector preemptive round-robin scheduler non-preemptive round-robin scheduler garbage collector support framework JX μKernel garbage collector virtual JVM virtual JVM virtual JVM Heap Por tal Threads Components Domain Heap Service Threads Components Components Heap Threads Domain Domain DomainZero c t i o e n t o a r n p d t s h c g i a e l a w b - t i l h i t y g i l A protection domain is a complete Java execution environment but has a very low memory footprint. Creating 1000 domains that concurrently print “Hello World!” in a loop requires about 35 MBytes, creating 1000 domains that concurrently serve 1000 TCP connection needs 105 MBytes. c d o n n a t a y i n t i m r u e c n e t s Domains are isolated and can communicate only via dedicated channels: the portal objects. The JX security system can control the propagation of all portals as well as their use. The security system that contains the security policy is separated from the domains and can be exchanged without changing the application domains. check transfer portal Components Heap Threads Domain B Components Heap Threads Security Components Heap Threads Domain A a n d s p i n a d e e h p t e n n e d d e n n e t p G e C d n i Each domain has its own heap that is completely independent from the heaps of other domains. This is in contrast to namespace-based domains of traditional Java systems and allows independent garbage collection runs, domain-specific garbage collection implementations, and domain termination with immediate resource reclamation. Heap of Domain A Heap of Domain B Heap of Domain C Global Heap traditional JVM JX i a t e d r e e m s o m u i r c h t i e w r e n c o l i a t m a n a i t i m o r n e t Except device driver domains all domains can be terminated immediately and their resources can be released completely. before termination after termination Heap Por tal Domain A Heap Por tal Domain B Invalid Invalid Domain C Heap Por tal Heap Domain A Service Heap Por tal Domain B r f o r e m p a d n o c o e g The performance of JX compares well with a traditional UNIX system, such as Linux. Our ext2- compatible file system, which is completely written in Java, achieves a throughput of 50 to 100 percent of Linux in the IOZONE re-read benchmark. 0 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: IOZONE benchmark: JX vs. Linux % vi c e e d d t ri s v u e b r s o r All device drivers are written in Java and benefit from the robustness that is provided by type safety. Robustness is further supported by special portal interfaces that allow drivers to access device registers and interrupt handler threads to synchronize with other threads. Device Driver Domain Heap DRAM Registers, On-device memory Memor y DeviceMemor y AtomicV ariab le Threads IRQ-Thread Heap Memory c o t d n e e r s a h p a s r i n n a g r t Immutable state can be shared between domains. This includes compiled code and string constants. Mutable state, such as static variables, is created per domain which makes code sharing completely transparent. Heap Shared Components Components Heap Components Domain A Domain B statics statics r v e i c s e c i c t r a e a m t o i t o u n a A service is automatically created when a service object is passed to another domain. This includes the creation of a new service thread or the addition of the service to an existing thread pool. The other domain receives a portal to the service. Domain A Domain B (2) Service Domain A Domain B (1) Domain A Domain B (3) Service Por tal Service Object e n m t e o g f a m n e a m m o c i r t y a a m r e o t a u s a JX provides a special abstraction memory portals to cope with large memory or special memory areas, such as memory-mapped device registers. Memory portals can be shared between domains and are garbage-collected. Domain B Heap DRAM Memor y Memory Memory Heap Memor y Domain A Reference Counts Threads of one domain can be scheduled independently of other domains. It is possible to use domain-specific schedulers that are written in Java. t s n c e h d e n d e u p l e i n d g n i Domain A Domain B Threads Threads global sc heduler local sc heduler local sc heduler n f o i g c u e r l a b t i i o x n e l f The protection domain structure is independent of the component structure. Components can be placed into the same or in separate domains without changing them. Network UDP IP Ether NIC UDP NFS Daemon NFSd RPC FS UDP BlockProvider BlockIO BlockIO IDE FS FileSystem FS VFS ext2FS Buffer BlockIO Configuration examples UDP monolitic NFS Server UDP IP Ether NIC NFSd RPC BlockIO IDE FS VFS ext2FS Buffer UDP

Upload: others

Post on 24-Jun-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: JX - A flexible Java Operating System · JX - A flexible Java Operating System ... compatible file system, which is completely written in Java, achieves a throughput of 50 to 100

University of Erlangen-NurembergDepartment of Computer Science

JX - A flexible Java Operating System©

20

02

JX

-Te

am

Michael Golm • Meik Felser • Christian Wawersich • Jürgen Kleinöder

Hardware

Java-levelscheduler

domainmanagement

sche

dule

r

Naming

DomainZero PortalsRuntime System

Memory

DomainManager

monitoring

low-levelCPU management

copyinggarbagecollector

mark&swepgarbagecollector

portalinvocation

memorymanagement

componentmanagement

conservativecollector

preemptiveround-robinscheduler

non-preemptiveround-robinscheduler

garbage collectorsupport framework

JXµKernel

garb

age

colle

ctor

virtual JVM virtual JVM virtual JVM

HeapPor tal

ThreadsComponents

Domain

Heap

Service

ThreadsComponents

Components

Heap

Threads

Domain

Domain

DomainZero

ctioe nt o ar np d t sh cgi ae law b-t ilh ityg i l

A protection domain is a complete Java execution environment but has a very low memory footprint.

Creating 1000 domains that concurrently print “Hello World!” in a loop requires about 35

MBytes, creating 1000 domains that concurrently serve 1000 TCP

connection needs 105 MBytes.

cd onna ta y inti mru ec ne ts

Domains are isolated and can communicate only via dedicated channels: the portal objects. The JX

security system can control the propagation of all portals as well as their use. The security system

that contains the security policy is separated from the domains and can be

exchanged without changing the application domains.

check

transfer portalComponents

Heap

Threads

Domain B

Components

Heap

Threads

Security

Components

Heap

Threads

Domain A

an ds p ina de eh p t en ne dd en ne t p Ge Cd ni

Each domain has its own heap that is completely independent from the heaps of other domains. This is

in contrast to namespace-based domains of traditional Java systems and allows independent

garbage collection runs, domain-specific garbage collection implementations, and

domain termination with immediate resource reclamation.

Heap of Domain A

Heap of Domain B

Heap of Domain C

Global Heap

traditionalJVM

JX

iated re em som ui rchti e w r en co li at ma n ai tim or net

Except device driver domains all domains can be terminated immediately and

their resources can be released completely.

beforetermination

aftertermination

HeapPor tal

Domain A

HeapPor tal

Domain B

Invalid

Invalid

Domain C

HeapPor tal

HeapDomain A

Service

HeapPor tal

Domain B

rfore mp ad no co eg

The performance of JX compares well with a traditional UNIX system, such as Linux. Our ext2-

compatible file system, which is completely written in Java, achieves a throughput of

50 to 100 percent of Linux in the IOZONE re-read

benchmark.

0

10

20

30

40

50

60

70

80

90

100

filesize in KBytes

achi

eved

thro

ughp

ut in

per

cent

4 8 16 32 64 128 256 512

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

IOZONE benchmark: JX vs. Linux

%

vicee d d t ris vu eb rsor

All device drivers are written in Java and benefit from the robustness that is provided by type safety.

Robustness is further supported by special portal interfaces that allow drivers to access

device registers and interrupt handler threads to synchronize with other

threads.

Device Driver Domain

Heap

DRAM

Registers,On-devicememory

Memor y

DeviceMemor yAtomicV ariab le

Threads IRQ-Thread

Heap

Memory

co t dn ee r sa hp as rin na grt

Immutable state can be shared between domains. This includes compiled code and string constants. Mutable state, such as static variables, is created per domain which

makes code sharing completely transparent.

Heap

Shared Components

Components

Heap

Components

Domain A Domain B

statics statics

rve ics ec i ct ra eam to it ou na

A service is automatically created when a service object is passed to another domain. This includes

the creation of a new service thread or the addition of the service to an existing

thread pool. The other domain receives a portal to the

service.

Domain A Domain B

(2) Service

Domain A Domain B

(1)

Domain A Domain B

(3) ServicePor tal

ServiceObject

enm t e og f a mn ea mm oci rt ya am reo t au sa

JX provides a special abstraction – memory portals – to cope with large memory or special memory

areas, such as memory-mapped device registers. Memory portals can be shared between domains and are

garbage-collected.

Domain B

Heap

DRAMMemor y

Memory

Memory

Heap

Memor y

Domain A

ReferenceCounts

Threads of one domain can be scheduled independently of other domains. It is

possible to use domain-specific schedulers that are written

in Java.

t sn ce hd en de up le ind gni

Domain A Domain B

Threads Threads

globalscheduler

localscheduler

localscheduler

nfo igc ue rl ab ti iox nelf

The protection domain structure is independent of the component structure. Components

can be placed into the same or in separate domains without

changing them.

Network

UDP

IP

Ether

NIC

UDP

NFS Daemon

NFSd

RPC

FS

UDP

BlockProvider

BlockIO

BlockIO

IDE

FS

FileSystem

FS

VFS

ext2FS

Buffer

BlockIO

Configuration examples

UDP

monolitic NFS Server

UDP

IP

Ether

NIC

NFSd

RPC

BlockIO

IDE

FS

VFS

ext2FS

Buffer

UDP