Papers/Others

Writing Solaris Device Drivers in Java

tomato13 2009. 8. 23. 14:22

http://research.sun.com/techrep/2006/smli_tr-2006-156.pdf


실험의 배경은 아래와 같다.


The Java programming language has been popular in the last decade because of its type and memory safety, automatic memory management, rich standard libraries, object-orientation, portability, and other features. However, it has rarely been used to create system software; the Java Virtual Machine(JVM) typically runs as a user application, interpreting or dynamically compiling an application compiled to Java bytecode.

일반적으로 Java는 System 레벨의 소프트웨어보다는 User Application Level 의 소프트웨어 구현에 많이 활용이 된다.


그리고 아래와 같은 구조로 Java 기반 Device driver를 구현하여 RAM을 기반으로 I/O 동작을 하고 C의 Device Driver를 사용한 경우와 비교해본다.

pic.gif


그림을 보면 squawkddi 라는 것이 있는데 squawk VM에서 제공하는 Device driver interface이다. 그리고 이것은 kernel layer의 solaris DDI를 기반으로 구현이된다. 그렇다면 kernel DDI는 C로 구현되어 있을텐데 어떻게 Java로 연계할 수 있었을까? Application에는 공개되지 않기 때문에 일반적인 JNI(Java Native Interface)는 아닌 것 같다. 하지만 Virtual Machine 내부에 별도의 연계를 지원하는 bytecode가 준비된 것 같다.


RAM 기반으로 file i/o를 비교한 데이터를 보면 역시 C Driver의 경우 빠른 속도를 보이게 된다. 하지만 Java로도 Driver구현이 가능하다는 것을 보였으며 Java의 여러 장점을 살릴 수 있다는데 의미가 있을 듯 하다.


pic.gif
0.01MB