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

Post on 24-Jun-2020

5 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

top related