<<

on top of the OSF Mach3 Microkernel Linux on top of the OSF Mach3 Microkernel Linux on top of OSF MK The Mach3.0 Microkernel: Design

¥ microkernel abstractions François Barbou des Places ([email protected]) ¥ task, , port, message, memory object Nick Stephen ([email protected]) ¥ resources and services represented as ports OSF Research Institute - Grenoble ¥ interfaces implemented via RPC to an object port Task Message ¥ Objectives: ¥ widen the audience for the free OSF micro-kernel Ports ¥ provide a complete and free platform to develop new Threads servers, applications or kernel extensions ¥ provide Apple with a freely redistributable microkernel-based for the Memory Apple/PowerMac platform Object

Freely Redistributable Conference - 5 Feb 1996 - Cambridge 1/17 Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 2/17

Linux on top of the OSF Mach3 Microkernel Linux on top of the OSF Mach3 Microkernel The Mach3.0 microkernel: Benefits OSF MK Improvements

¥ portability (modular design) ¥ performance ¥ symmetric multi-processing support ¥ kernel-loaded servers (collocation) ¥ thread migration ¥ scalability (from desktop PCs to high-end multi-computers) ¥ short-circuited RPC ¥ extensibility ¥ real-time ¥ OS-neutrality ¥ preemptable kernel ¥ support for OS personalities running as user tasks ¥ real-time RPC, priority inheritance ¥ pageable, preemptable ¥ distributed system (clusters and multi-computers) ¥ more portable: isolated from hardware ¥ DIPC: transparent Distributed IPC ¥ simpler: no device drivers, , VM... ¥ XMM: transparent distributed ¥ external memory managers ¥ more: MK++, CORDS (xkernel), Fault Tolerance, ...

Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 3/17 Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 4/17 Linux on top of the OSF Mach3 Microkernel Linux on top of the OSF Mach3 Microkernel OSF MK on the Apple/PowerMac Linux Server

¥ portability: no changes to machine-independent code Why Linux ? ¥ validated with the MPTS (MK performance test suite) ¥ pleasant and efficient development platform ¥ initial target: PPC601 (PowerMac 7100 and 8100) ¥ evolving very quickly: leverage the effort ¥ support from Apple Computer, Inc. ¥ heavily supported by Internet community ¥ status ¥ not derived from BSD ¥ supports the Linux server ¥ performant dynamic buffer cache ¥ console, SCSI disk, serial port, ethernet drivers ¥ X-Window running Drawbacks ¥ next steps ¥ portability: still quite biased towards PC ¥ support more hardware (drivers, PPC603 and 604, ¥ fast moving target PCI and CHRP PowerMacs)

Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 5/17 Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 6/17

Linux on top of the OSF Mach3 Microkernel Linux on top of the OSF Mach3 Microkernel Linux Server: Design Constraints Linux Server: Code Reuse

¥ leverage Linux evolution linux-1.2.13 + server ¥ minimize changes to Linux code 1117 files ¥ binary compatibility new server files Linux files ¥ integration into the Linux tree: 188 929 ¥ new “architectures”: osfmach3_i386 and osfmach3_ppc ¥ machine-independent code in osfmach3 subdirectory machine new unmodified dependent PPC 866 ¥ build on Linux or the Linux server 100 20 ¥ serialized multi-threaded single server machine modified independent for server ¥ no emulation library 88 43 ¥ objective: performance parity with Linux ~ 50% of those files are in machine-dependent locations, but don’t really need to be ported Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 7/17 Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 8/17 Linux on top of the OSF Mach3 Microkernel Linux on top of the OSF Mach3 Microkernel Linux Server: Syscall Redirection Linux Server: Device Access emulation library syscall exception Linux Linux server sys_read sys_read emulation shared library memory block_read block_read ll_rw_block ll_rw_block OS user OS make_request make_request task device_reply_thread server server device intr user driver queue wait_on_buffer block_read_reply task copy data wait_on_buffer ... unlock_buffer ... end_request return ... unlock_buffer microkernel microkernel return microkernel - unprotected privileged code + safety device interfaces - complexity + unique and simple interface this code is common to all this code is replicated in - multi-threaded tasks - no optimized local syscalls block devices and machine each block independent + optimized local syscalls Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 9/17 Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 10/17

Linux on top of the OSF Mach3 Microkernel Linux on top of the OSF Mach3 Microkernel Linux Server: Linux Server: Signals and Time Linux Linux Server Fake areas vm areas ¥ signals normally processed on returned from or system call page tables dummy page tables ¥ force delivery on user-mode-bound processes ¥ take control of by suspending and aborting microkernel Hardware MMU the user thread if not in a system call VM interfaces ¥ fall back to the exception handling path ¥ Linux’s vm_area structs translated into Mach VM mappings Jiffies ¥ keep dummy and generic code for code re-use ¥ jiffies thread ¥ mapped files ¥ use Mach clock services to sleep 10 millisecs ¥ memory object associated to an ¥ call do_timer ¥ inode pager (EMM) thread, serving requests from MK ¥ simple but inefficient, will be redesigned

Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 11/17 Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 12/17 Linux on top of the OSF Mach3 Microkernel Linux on top of the OSF Mach3 Microkernel Linux Server: Dynamic Buffer Cache Linux on OSF MK: Status on i*86

¥ cooperation between VM (microkernel) and Buffer Cache ¥ boots from LILO (Linux server) ¥ 100% binary compatible ¥ emulate the free_area pool of pages in a memory object ¥ supports virtual consoles, X-Window, gpm and sdoom ! ¥ external memory manager: a Linux server thread

¥ advisory pageout to avoid races and select page to free ¥ current overall performance: 93% of Linux’s performance ¥ memory_object_discard_request EMM interface ¥ disk IO performance better than Linux ¥ try_to_free_page() • memory_object_lock_request: let the MK release the page ¥ biggest performance penalty on syscall path and copyin/out operations ¥ MK falls back to default pager in case of problem ¥ also avoids double paging (paging buffer cache pages)

Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 13/17 Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 14/17

Linux on top of the OSF Mach3 Microkernel Linux on top of the OSF Mach3 Microkernel Linux on OSF MK: Conclusion Linux on OSF MK: Apple PowerMac

Achievements ¥ runs the available Linux/PPC commands and X-Window ¥ OSF MK can support Linux and with good performance Further Information ¥ a free development platform for OSF MK now exists Next Steps http://www.mklinux.apple.com ¥ complete functionality and improve performance Availability ¥ integrate Linux device drivers ¥ summer 1996 ¥ take advantage of OSF MK added value BOF Session at the OSF ¥ multi-threaded tasks, SMP, real-time, clusters Snapshot Available for i*86 ¥ this evening (Sunday Feb 5) from 8:30 to 10:00 PM ¥ at OSF, 11 Cambridge Center - 100 yards from the Marriott http://www.gr.osf.org/mklinux ¥ demo of Linux on OSF MK on Intel and PowerMac

Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 15/17 Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 16/17 Linux on top of the OSF Mach3 Microkernel Linux on OSF MK: Apple PowerMac

¥ runs the available Linux/PPC commands and X-Window

Further Information http://www.mklinux.apple.com

Availability ¥ summer 1996

BOF Session at the OSF ¥ this evening (Sunday Feb 5) from 8:30 to 10:00 PM ¥ demo of Linux on OSF MK on Intel and PowerMac

Freely Redistributable Software Conference - 5 Feb 1996 - Cambridge 17/17