Top Banner
The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah
31

The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Dec 19, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

The Alta Operating SystemThe Alta Operating System

Patrick Tullmann

Masters Thesis Defense

University of Utah

Page 2: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

AltaAltaAlta is an operating system in a

Java Virtual MachineManages multiple applications on a

single JVMSupports the Fluke OS nested

process model (NPM)

Page 3: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Research GoalsResearch GoalsCan I change the protection

mechanism in an OS model?Can I provide safe, controlled

sharing between Java processes?

Page 4: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Airline DatabaseAirline Database

Public Area

Registered Agents

Motivation: Servlet EngineMotivation: Servlet Engine

MorrisUniglobe

UTUT NVNV

Page 5: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

MotivationMotivationJava Virtual Machine provides:– Safety– Platform independence

Java-based systems need:–Multiple “user” management– Resource management– Flexible & extensible control

Page 6: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

ApproachApproachTraditional OS a good model– Hardware provides safety mechanism– OS provides management

Fluke OS nested process model

Page 7: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Fluke BackgroundFluke BackgroundMicrokernel– Threads, mutexes, IPC, …–Manages CPU and memory

User-level services – File, Network, …

Nested process model– Structured–Well defined

Page 8: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Nested Process ModelNested Process ModelA model of how processes interactHierarchical: parent process provides

resources

Parent Process

Child BChild A

11 22

Page 9: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Mapping an OS into JavaMapping an OS into JavaType safety replaces hardware page

protectionsBytecodes replace simple

instructionsNative methods replace privileged

instructionsAll higher-level abstractions are

equivalent

Page 10: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Goals for AltaGoals for AltaSupport Fluke features for process

management–Mimic Fluke structure– Provide parent process with control

Acceptable performanceMaintain backwards compatibility– Existing Java apps should work

Page 11: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Design of AltaDesign of AltaFour design aspects (really seven)–Maintain “whole JVM” illusion– Per-process, flexible typespaces– Inter-process sharing– Sharing & resource control– IPC-based interfaces– Exportable kernel state– Kernel implementation

Page 12: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Design of AltaDesign of AltaFour design aspects –Maintain “whole JVM” illusion– Per-process, flexible typespaces– Inter-process sharing– Sharing & resource control

Page 13: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Design of AltaDesign of AltaFour design aspects–Maintain “whole JVM” illusion– Per-process, flexible typespaces– Inter-process sharing– Sharing & resource control

Page 14: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Per-process TypespacesPer-process TypespacesTypespace: Set of name to class

bindings in a processExtension of the NPM to JavaParent process resolves all class

names– Enables access controls– Enables code control in child process– Problems with native methods– Poses problems for sharing

Page 15: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Per-process TypespacesPer-process TypespacesImplies class has no fixed nameImplies there can be inconsistencies– Different notion of ‘File’– Same notion of ‘Directory’

Page 16: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Design of AltaDesign of AltaFour design aspects–Maintain “whole JVM” illusion– Per-process, flexible typespaces– Inter-process sharing– Sharing & resource control

Page 17: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Inter-process SharingInter-process SharingAlta allows limited inter-process

sharing– Initial sharing via IPC– Sharing through other shared objects

Processes can have inconsistent typesInter-process type inconsistencies can

destroy a JVM– pointer forging

Page 18: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Inter-process Type CheckingInter-process Type CheckingAlta ensures equivalent types for all

shared objectsEffective limits on shareable types:– Completely consistent field types– Only allows non-polymorphic fields

Page 19: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Design of AltaDesign of AltaFour design aspects–Maintain “whole JVM” illusion– Per-process, flexible typespaces– Inter-process sharing– Sharing & resource control

Page 20: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Sharing & Resource ControlSharing & Resource ControlSharing complicates resource

control– Termination of process that has

“exported” objectsAlta lets applications control sharing– Nested process model enables

constrained sharing

Page 21: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

User-level Shared ObjectsUser-level Shared Objects

Child allocates -> Parent references– Harmless. If parent dies then child dies

– Useful. Child can pass IPC arguments

Sibling allocates -> Sibling references– Allowable. Parent trades communication

costs for separation

Parent allocates -> Child references– Standard server behavior

– Cannot deallocate without child’s cooperation

Page 22: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Results & EvaluationResults & EvaluationMicro-benchmark measurementsComparison with Fluke– Structure– Performance

Page 23: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

PlatformPlatformBase system– Kaffe Java virtual machine

Platform–Measurements from a 300 Mhz PII– Java code is JIT compiled

Page 24: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Micro-benchmarksMicro-benchmarksAlta vs. Kaffe– Basic VM operations are ~ unchanged– 50-100 cycle overhead on object

allocation Kaffe/Alta vs. Microsoft JVM– Three (or more) times slower

Page 25: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Alta vs. Fluke: StructureAlta vs. Fluke: StructureUse similar internal organization– Both implement a “red line” [Back 1999]– Fully preemptible kernel

Alta allows kernel / user data sharing Alta’s kernel is almost malloc-less– Except some JVM-internal structures

Page 26: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Alta vs. Fluke: PerformanceAlta vs. Fluke: PerformanceAlta wins:– Null system call

• 192 cycles (vs. 302 in Fluke)

– Optimal thread switch• 185 cycles (vs. 519 in Fluke)

Fluke wins everything else, e.g., – Null IPC round trip

• 18,524 cycles (64 µs) vs. 7,519 cycles in Fluke

– Process creation:• ~11.9M cycles (39 ms) vs. 1M cycles in Fluke

Page 27: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Performance EvaluationPerformance EvaluationAlta hampered by poor JIT compiler– GCJ will improve this– Alta kernel is C-like– HotSpot, etc provide interesting

opportunitiesAlta can be optimized, too– Static definition of a typespace– Better kernel synchronization– Incorporate recent Fluke optimizations

Page 28: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Related Work: JavaRelated Work: Java [Balfanz 1998], [Bernadat 1998], [Sun 1998]J-Kernel [Hawblitzel 1998]

– Pure Java

– No inter-process sharingKaffeOS [Back 1999]

–More restrictive sharing

– Resource management focus• Per-process heaps• GC time accounting• ...

Page 29: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Related Work: OSRelated Work: OSPilot / Cedar / Mesa [Redell 1980],

[Swinehart 1986]Oberon / Juice [Franz 1996]Inferno [Dorward 1998]SPIN [Bershad 1995]Vino [Seltzer 1996]

Page 30: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

Future WorkFuture WorkResource accounting & GCFormal analysis of Alta type systemFluke & Alta integrationAlta-specific applications

Page 31: The Alta Operating System Patrick Tullmann Masters Thesis Defense University of Utah.

ContributionsContributionsAlta demonstrates applicability

of OS abstractions to JavaThe Fluke NPM with a different

protection mechanism Multiple application support in a JVMType-safe sharing between

inconsistent typespaces