Java Operating Systems: Design and Implementation

Godmar Back, Pat Tullmann, Leigh Stoller, Wilson Hseih, Jay Lepreau (Utah), 1998

Summary. A process abstraction is necessary in language-based OSes that enables resource management and interprocess communication -- not just protection. A spectrum of challenges exist in resource mgt of cycles, memory and network bandwidth. The authors list several issues and describe solutions from three sample systems: GVM, Alta and JKernel.


More Detail.

Memory. Two issues:
  1. Sharing model: copying, direct, indirect (direct with an additional level of indirection). These vary indirectly in performance and ease-of-protection.
  2. Allocation. Straightforward approach: JVM debits process on allocation; GC system credits on cleanup. Fragmentation attack: when a process with a small budget allocates small chunks in a system which only allocates by large chunk.

CPU Usage. Two mechanisms must be in place to manage cycles:

  1. Accounting:
    • Non-shared services implemented as library or system calls easy: acctg amounts to counting CPU time thread accrues.
    • GC.Shared system services such as GC complicate;if treated as a global service, two types of attacks possible: GC denial-of-service attack possible if a malicious process continually causes invocation of GC; priority inversion can also occur if a lower priority process causes invocation of GC such that higher priority process cannot run. Two GC approaches: ould do GC acctg as global service but charge each block to appropriate process; probably too costly. Second approach: per-process heap.
    • Packet Handling. Goal is to minimize time to demux so that resources can be charged. Authors advocate LRP - a combination of early demuxing, early packet discard, and processing of packets at the receiver's priority.
  2. Preemptibility: challenge is to avoid causing priority inversion or deadlock by preempting or killing low-priority thread holding a shared lock. Java systems must define a user/kernel boundary.

Network bandwidth. Can count packets by process, socket, session. Must be careful of the level in which resource acctg is done: high level acctg may not reflect physical resources accurately.