views:

80

answers:

1

I am looking to get into operating system kernel development and figured my contribution would be to extend the SANOS operating system in order to support JDK 1.6 and 1.7. I have been reading books on operating systems (Tannenbaum) as well as studying how BSD and Linux have tackled this challenge but still am stuck on several concepts.

  1. What is the fastest way to tell what additional system calls I would need to support as SANOS starts more from the bottoms up?

  2. If I have a list of system calls that need to be supported, what is the best way to roll them up if they are similar in nature?

+1  A: 

The minimum number of system calls any reasonable *nix style OS should have are (IMHO):

  • open
  • close
  • read
  • write
  • fork
  • exec
  • waitpid

the first 4 allow you to both provide input to a program and get its output. (Remember on *nix like operating systems stdout is just another file handle as far as the OS is concerned).

The other 3 are the bare minimum needed to start another program and wait for its result. However, it is certain that SanOS already has these since it is already a very functional operating system.

It is entirely possible that the additions you need to make won't need to be done at a kernel level.

EDIT:

As far as what is needed to support a newer JVM, this paragraph from the SanOS site gives a great hint:

You can run the Windows version of Sun HotSpot JVM under sanos. This is possible because sanos supports the standard PE executable format (.EXE and .DLL files). Wrappers are provided for the Win32 DLLs like kernel32.dll, user32.dll, wsock32.dll, etc., as well as the C runtime library msvcrt.dll. I have tested sanos with the following JVMs:

Basically, the JVMs are the standard windows exe files. So you would just need to find out which system calls the referenced dlls make and ensure that they exist and are implemented correctly.

Evan Teran
"So you would just need to find out which system calls the referenced dlls make and ensure that they exist and are implemented correctly." How is the above accomplished...
jm04469
well i suppose one way (probably the most brute force way) would be to use a tool called strace (there is a version for windows). That will log all system calls a program uses. However, this output will be very verbose, you'll likely want to have it filter out the system calls you do have implemented.
Evan Teran
Just a note, I think you are jumping in a little to deep at the moment. OS development is not easy, and a decent kernel developer should know how to do simple tasks such as discover what system calls programs use on there OS. You likely should do a bit more research before actually trying this.
Evan Teran
Evan, I think research also involves posting questions to sites such as Stackoverflow to get answers that I otherwise wouldn't be able to find...
jm04469
True, no harm in asking questions (after all, that's what this site is for).
Evan Teran