An Experimental - PowerPoint PPT Presentation

About This Presentation
Title:

An Experimental

Description:

An executing method of a OS kernel represented in the CIL ... DMA Controller & ATA/ATAPI & CD-ROM device driver. ISO9660 (CD-ROM file system) driver ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 20
Provided by: coos
Category:

less

Transcript and Presenter's Notes

Title: An Experimental


1
An Experimental .NET Operating System
Based on
the CLI
Theme Workshop 2006 - Microsoft Research Asia
  • An executing method of a OS kernel represented in
    the CIL

Research Division in Engineering, Musashi
Institute of TechnologyAkio TAKAHASHI Graduate
School of Systems and Information Engineering
University of TsukubaKazuhiko KATO
2
Introduction
  • We developed a new CLI (.NET)-based operating
    system.
  • CLI is used in two ways
  • The OS is implemented with CLI.
  • Application programs run on CLI.
  • The OS is mostly written in C.
  • Type safety
  • Memory safety

3
Backgrounds
  • CLI provides enough specs that system software
    should have.
  • Effective speed
  • Security
  • However, CLI has not been applied to operating
    systems.
  • Conventional OSs cannot fully take advantage of
    CLI.
  • To use CLI for OS description, we have to develop
    a technique to handle CLI intermediate codes for
    OS kernel execution.
  • CLI languages are usually compiled into a
    intermediate code,the CIL (Common Intermediate
    Language).

4
Related Work
  • Java-based
  • JavaOS (Sun Microsystems)
  • JX (OSS)
  • JNode (OSS)
  • CLI-based
  • Singularity (Microsoft Research)

5
Basic Architecture
  • (4 slides)

6
Approaches
  • Utilize CLI features as much as possible.
  • At runtime, all the system objects are expressed
    in CLI.
  • Take advantage of existing software
  • Mono Class Library (as .NET standard library)
  • The FreeType font engine

7
System Structure
  • Legacy Kernel
  • Functions
  • Memory manager Device drivers
  • CIL interpreter
  • Written in C and compiled into native codes in
    advance.
  • Used only in the bootstrap time it disappears
    after that.
  • Managed Kernel
  • Functions
  • Ordinary OS functions
  • CIL compiler
  • Mostly written in C and compiled into CIL codes
    in advance.
  • At the bootstrap time, the CIL codes are compiled
    into native codes by the (self) CIL compiler by
    using the CIL interpreter in Legacy Kernel.

8
Bootstrap Sequence
(disappear)
  • Finally, only CIL programs remains in the system.

9
Advantages of the Proposed Method
  • The entire system can be expressed in CLI.
  • We can fully take advantage of CLI technologies
    even in the earlier stages.
  • Both native and CLI codes can be executed in a
    mixed manner.
  • Mono Class Library is used with trivial
    modifications.
  • High portability
  • Architecture-dependent part is well modularized.
  • We dont use MMU.

10
Experiments and Demo
  • (5 slides)

11
Demo
  • Run our OS with Text-mode on VMware
  • It takes about 3 minutes to bootstrap and show
    the prompt.
  • What you see on bootstrapping is
  • Legacy Kernels Loading (with NO outputs)
  • Compiling a little part (not complete)
  • Managed Kernels Loading some data (with many
    outputs)
  • What I do is
  • Execute a ls program for listing the contents
    of CD-ROM
  • Execute a cat program for its source file

12
Start-up Screens
  • Figures are taken just after OS booted.
  • Text Mode (Left)Graphic Mode (Right)

13
Fundamental Test
  • The simple ls program (ls.cs).
  • Compile ls.cs on Windows
  • Run ls.exe on Windows
  • Copy ls.exe to our OSAnd run also
  • We confirmed successful execution
  • Cross-platform execution
  • File system compatibility
  • using System
  • using System.IO
  • class ls
  • static void Main(string args)
  • DirectoryInfo dir
  • if(args.Length0)
  • dir new DirectoryInfo(
  • Directory.GetCurrentDirectory())
  • else
  • dir new DirectoryInfo(args0)
  • foreach(FileSystemInfo fsi in dir.GetFileSystemIn
    fos())
  • Console.Write("0,-32 ", fsi.Name)
  • if(fsi is FileInfo)
  • FileInfo fi (FileInfo)fsi Console.Write("0,
    10 B", fi.Length)
  • else
  • Console.Write("0,10 -","")

14
Practical Test using Font Engine
  • In both Windows and our OS, the FreeType Library
    can be successfully executed.
  • FreeType is a high-quality font rendering engine
    written in C.
  • Japanese characters are handled.

15
Writing Device Drivers
  • A constructor and a initializing method of DMA
    Controller class
  • In the constructor, associative IOPort instances
    are created.
  • In the initializing method, the device is
    controlled via associative I/O ports.
  • private DMAController(
  • ushort cadr0, ushort cadr1, ushort cadr2, ushort
    cadr3,
  • ushort ccnt0, ushort ccnt1, ushort ccnt2, ushort
    ccnt3,
  • ushort psts, ushort pcmd, ushort preq, ushort
    psmask,
  • ushort pmode, ushort pcbpf, ushort ptmp, ushort
    pmclr,
  • ushort pcmask, ushort pamask)
  • this.cur_address0 new IOPort1(cadr0)
  • this.cur_address1 new IOPort1(cadr1)
  • this.cur_address2 new IOPort1(cadr2)
  • this.cur_address3 new IOPort1(cadr3)
  • this.cur_counter0 new IOPort1(ccnt0)
  • this.cur_counter1 new IOPort1(ccnt1)
  • this.cur_counter2 new IOPort1(ccnt2)
  • this.cur_counter3 new IOPort1(ccnt3)
  • this.status new IOPort1(psts)
  • this.command new IOPort1(pcmd)
  • this.request new IOPort1(preq)
  • this.single_mask new IOPort1(psmask)

16
Conclusion
  • We designed and implemented a 100-pure CLI OS.
  • Existing large-scale CLI libraries are executed
    with trivial modification.
  • Mono Class Library
  • FreeType font engine
  • Device drivers are written in C.
  • DMA Controller ATA/ATAPI CD-ROM device driver
  • ISO9660 (CD-ROM file system) driver

17
Future work
  • Remove dependencies on the CIL interpreter to
    execute a few runtime methods.
  • This requires analysis of the call-graphs of the
    runtime methods.
  • Pre-execute the CIL interpreter in Legacy Kernel
    to generate a ready-made image of Managed Kernel,
    to shorten the start up time.

18
Acknowledgements
  • This research project was supported by Mitou
    Software Development Program of
    Information-technology Promotion Agency (IPA),
    Japan.
  • We thank to Dr. Dave Provert for useful comments.

19
  • Does anyone have any questions?
Write a Comment
User Comments (0)
About PowerShow.com