Upload
ashishkumar-haldar
View
228
Download
0
Embed Size (px)
Citation preview
8/13/2019 JavaOS Java on the Bare Metal
1/35
8/13/2019 JavaOS Java on the Bare Metal
2/35
JavaOS JavaOS
Java onJava onthe Barethe Bare
MetalMetal
Peter MadanyPeter Madany
8/13/2019 JavaOS Java on the Bare Metal
3/35
Outline
Goals
Hosted Java
JavaOS
Technical overview Advantages
Target systems
Status
Demo
Future
8/13/2019 JavaOS Java on the Bare Metal
4/35
Goals Enable new types of network devices
Intelligent Dynamic
Simple to install, administer, and use
Run Java in systems with limited resources Java-enabled devices Cannot assume high-end hardware and software
Limited Hardware: Limited Memory: RAM, ROM
Optional items display and disks
No host operating system
Minimize memory requirements
8/13/2019 JavaOS Java on the Bare Metal
5/35
How Features Are Delivered
Today: the Java language is embedded
in applications
e.g. browsers
Soon: embedded within operating systems e.g. in Solaris, Windows, Mac OS
Both rely on a host OS Conclusion: today Java requires a host OS
8/13/2019 JavaOS Java on the Bare Metal
6/35
Java on a Conventional OS
Java Run-Time
Platform Independent +Platform Dependent
libnetlibawt
Operating System (Windows 95, MacOS 7.5, Solaris 2.5)
Java Foundation Net and IOAWTClasses ClassesClasses
Java
C
JavaAPI
HotJava
LEGEND:JavaSoft Software
3rd Party Software
Hardware
8/13/2019 JavaOS Java on the Bare Metal
7/35
Major Features
Java Virtual Machine
Byte-code interpreter
Class loader
Garbage collector
Language and Utility Classes
AWT Classes Net Classes
IO Classes
8/13/2019 JavaOS Java on the Bare Metal
8/35
Host OS Requirements
Support for threads
Context switching
Memory Allocation
Window system Network Protocols
File Systems
Device drivers
Keyboard
Mouse Display
8/13/2019 JavaOS Java on the Bare Metal
9/35
Matching Java to a Host OS
Map AWT to window system
Map Net classes to native networking
Map file-related IO classes to
file system
Port platform-dependent part of VM
8/13/2019 JavaOS Java on the Bare Metal
10/35
Java Without a Host OS
Provide just enough kernel features:
To implement the Java VM
Just enough Java-based code for:
AWT, Net, and File IO
Necessary device drivers
Display and network Mouse and keyboard
Still support the full Java Platform API
8/13/2019 JavaOS Java on the Bare Metal
11/35
JavaOS Architecture
Java Foundation
HotJava
Classes
JavaAPI
Java Virtual Machine
LEGEND:
Java
C and assembler
Hardware
Booting, traps, interrupts, threads
IP
Ethernet
Net and IOclasses
Java
windows
Javagraphics
AWTclasses
TCP
UDP
NFS client
KBD Mouse
8/13/2019 JavaOS Java on the Bare Metal
12/35
JavaOS Details: JavaKernel
Bootstrap
Memory allocation
Device mapping
Trap and interrupt handling
Thread support
Simple context switching Single address space
8/13/2019 JavaOS Java on the Bare Metal
13/35
JavaOS Details:
Virtual Machine
The virtual machine implements Java Bytecode interpreter loop
Java exception handling
Memory management
Threads
JavaOS mostly uses standard VM
Tuned the malloc and Java-compatible heaps Class garbage collection
8/13/2019 JavaOS Java on the Bare Metal
14/35
JavaOS Details: ROMability
Java-based byte codes are modified
when run
Cannot be placed as is in ROM
The ROMizer tool Converts set of class files into ROMable,
bootable Java-based images Performs some optimizations on the image
8/13/2019 JavaOS Java on the Bare Metal
15/35
JavaOS Details: Device Drivers All device drivers written in Java
Use two small C support classes For memory objects and interrupt dispatch
We have working device drivers for: Ethernet
Keyboard, mouse, serial ports, and clock
Several frame buffers, including VGA Audio
Designing a Java-compatible Device
Driver Interface
8/13/2019 JavaOS Java on the Bare Metal
16/35
JavaOS Details: Networking
Written in the Java language
We currently have working versions of: TCP, UDP, IP and ICMP
ARP for address resolution DNS or NIS for hostname lookup and login
DHCP or RARP for address discovery
NFS client-side, including SunRPC/XDR SNMP agent for network management
Socket support
Network time
8/13/2019 JavaOS Java on the Bare Metal
17/35
JavaOS Details:
Windows & Graphics
Uses the Tiny AWT widget library
X-windows would be too heavy-weight
Window system
Small window system Written in the Java language
Optimized for limited memory
Graphics rendering package Mostly written in Java Designed for AWT
Lowest level uses native methods written in C
Bitmapped fonts
8/13/2019 JavaOS Java on the Bare Metal
18/35
JavaOS Details: Applet API
Same code
Same API
8/13/2019 JavaOS Java on the Bare Metal
19/35
HotJava As Desktop
HotJava HTML browser
Written in the Java language
Supports multiple windows
Can run multiple applets per window
Dynamically extendable
Could run other Java-based programs Possibly customized versions of HotJava
8/13/2019 JavaOS Java on the Bare Metal
20/35
JavaOS Is Not an OS
6. It doesnt need a file system
5. It doesnt need virtual memory
4. It doesnt need separate address spaces
3. It doesnt support more than one language
2. It doesnt have its own set of system calls
1. ...
8/13/2019 JavaOS Java on the Bare Metal
21/35
JavaOS Is Not an OS
1. Marketing tells people it is NOT an OS
8/13/2019 JavaOS Java on the Bare Metal
22/35
JavaOS Is an OS9. You can boot it
8. You can log in to it7. It safely runs several applets at a time
6. It drives devices5. It networks
4. It does windows
3. It has an API the Java Applet API
2. Tons of applets are being written for it
8/13/2019 JavaOS Java on the Bare Metal
23/35
JavaOS Is an OS
1. Marketing tells people it is an OS
8/13/2019 JavaOS Java on the Bare Metal
24/35
JavaOS Performance: Speed
System built without using a JIT compiler
Network performance
Current TCP/IP throughput is 500K Bps
Little tuning
No native methods written in C
8/13/2019 JavaOS Java on the Bare Metal
25/35
JavaOS Performance: Speed
Pendragon CaffeineMark
CategoryCategory
SeiveSeiveLoopLoop
GraphicsGraphics
ImageImage
CaffeineMarkCaffeineMark
Netscape/SolarisNetscape/Solaris
31312727
8989
5757
5151
HotJava/SolarisHotJava/Solaris
33332727
102102
9696
6464
HotJava/JavaOSHotJava/JavaOS
33332929
122122
265265
112112
8/13/2019 JavaOS Java on the Bare Metal
26/35
JavaOS Performance: Memory 4MB ROM
Code for JavaOS includes: Kernel code and drivers, Java VM and classes,
JavaOS windows, graphics, and networking
Code for HotJava
Fonts of various types, sizes, and styles
4MB RAM Assuming ROM can be executed in place 2.5MB for JavaOS + Hotjava
1.5MB for pages, applets, and images
8/13/2019 JavaOS Java on the Bare Metal
27/35
JavaOS Advantages Eliminates host OS overhead
Smaller size No extraneous features
Faster startup
ROMable Written in the Java language
Safe language
Portable Dynamically extendable
Cost of ownership
Ease of installation Ease of administration
J OS f
8/13/2019 JavaOS Java on the Bare Metal
28/35
JavaOS for
Intranet Computers Exploit enterprise network infrastructure
Ethernet at each desktop Higher speed backbone networks
Level of system administration depends on
choice of protocols like DHCP or RARP
Supports Java-based applicationenvironment
MIS applications easier to develop,deploy, maintain
OEMs build JavaOS Intranet Computers
J OS f
8/13/2019 JavaOS Java on the Bare Metal
29/35
JavaOS for
Internet Computers Use current or future home networking
High-speed modem ISDN
Cable modem
Requires an Internet Service Provider(ISP) to make it behave like an appliance
Supports Java-based applicationenvironment Suitable for surfing the Web
OEMs build JavaOS Internet Computers
8/13/2019 JavaOS Java on the Bare Metal
30/35
JavaOS for Network Devices Tailoring Java to fit the device
No subsetting of: Java VM and language and utility classes
Include or exclude based on hardware features: AWT, Net, and file-related IO classes
Tune system for soft real time VM and garbage collection
JavaOS Development Environment
Embedded JavaOS memory requirements: 128K RAM, 512K ROM
Retains ability to download new Java code
8/13/2019 JavaOS Java on the Bare Metal
31/35
JavaOS Status Currently runs on two platforms
SPARC
X86
Being ported to other platforms Available in October 1996
8/13/2019 JavaOS Java on the Bare Metal
32/35
JavaOS Demo Demo hardware
Prototype network portal
Demo software
No host OS
Alpha JavaOS
Pre-beta HotJava Demo applets
8/13/2019 JavaOS Java on the Bare Metal
33/35
JavaOS Future New Java APIs
Device Driver Interface
Window system enhancements
Scalable fonts
8/13/2019 JavaOS Java on the Bare Metal
34/35
Summary Features
Performance
Advantages
Target systems
Status
8/13/2019 JavaOS Java on the Bare Metal
35/35
Deep Dive: JavaKernel MMU usage
Modified only at boot-time
Used to make memory ranges contiguous
JavaOS runs in supervisor mode only Java-compatible interrupt handlers
were a little tricky Low-level code uses interrupts-as-threads