Slide 1

Slide 1 text

Microkernel-based operating system development Senko Rašić

Slide 2

Slide 2 text

operating system (OS): A part of software that manages hardware resources and provides a safe environment for processes to execute in.

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

the micro-kernel idea: Hardware drivers and operating system services are regular processes. The kernel has only the required basic functionality

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

intensive inter-process comunication + slow IPC calls = bad performance

Slide 9

Slide 9 text

mainstream systems: Monolithic kernels with some elements of microkernel design ongoing research: L4, Exokernel, ...

Slide 10

Slide 10 text

L4 microkernel  recursive address spaces  highly optimized IPC L4Ka::Pistachio – an implementation by the University of Karlsruhe

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Open Source software  availability  community  malleability

Slide 17

Slide 17 text

Hasenpfeffer  based on L4 microkernel  set of servers cooperating through IPC calls  maximal reuse of available open source components (NIH syndrome avoidance)

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

Inter-process communication  server and client processes  communication interface  IDL4 generates server and client stubs interface File { boolean Read(in Capability_t cap,in unsigned long offset, out byteseq_t buffer, inout unsigned long size); unsigned long Size(in Capability_t cap); ... }

Slide 20

Slide 20 text

Remote procedure calls

Slide 21

Slide 21 text

capability: The privilege to invoke a specific RPC.

Slide 22

Slide 22 text

Naming system

Slide 23

Slide 23 text

Name system

Slide 24

Slide 24 text

Features  program loading and execution (ELF)  multiprocessing, multithreading  standard C library available  hard disk (IDE) support  TinyScheme i TinyBasic programming languages

Slide 25

Slide 25 text

3rd party components  IDE disk driver  display output, keyboard input  C library  TinyScheme interpreter  TinyBasic interpreter

Slide 26

Slide 26 text

System boot

Slide 27

Slide 27 text

Software Development Kit  Linux system  GNU C/C++ compiler  L4Ka::Pistachio development environment

Slide 28

Slide 28 text

Testing  QEMU  VMWare Workstation  L4 KDB (Kernel Debugger) Test environment: − floppy disk image for OS boot (using grub) − IDE disk image with ext2 filesystem

Slide 29

Slide 29 text

QEMU & KDB in action

Slide 30

Slide 30 text

Software development #include #include #define SECOND 1000000UL int main(int argc, char *argv[]) { char buf[1024]; L4_Sleep(L4_TimePeriod(4 * SECOND)); printf("Hello, I'm %s!\nWho are you: ", argv[0]); fgets(buf, 1023, stdin); printf("Howdy, %s\n", buf); return 0; }

Slide 31

Slide 31 text

Software development  Standard C source code  Build system config (scons) − based on L4 system build system  Build and creation of floppy image  System boot configuration  Virtual machine execution and testing

Slide 32

Slide 32 text

Software development

Slide 33

Slide 33 text

In summary developed system: − rudimentary − extensable microkernel: − good base for future development open source: − availability − malleability