Faculty for Computer Science Operating Systems Group Master Thesis Summer semester 2018 PylotOS - an interpreted Operating System Submitted by: Naumann, Stefan [email protected] Programme of study: Master Informatik 3rd semester Matriculation number: XXXXXX Supervisors: Christine Jakobs Dr. Peter Tröger Prof. Dr. Matthias Werner Submission deadline: 11th July 2018 Contents 1. Introduction 1 2. Preliminary Considerations 3 2.1. Textbook Operating System Architecture . 3 2.1.1. Processes and Interprocess Communication . 4 2.1.2. Driver Model . 6 2.2. Platform Considerations . 9 2.2.1. Intel x86 . 9 2.2.2. Raspberry Pi . 11 3. Existing Implementations 13 3.1. Related Work . 13 3.2. The C subroutine library . 15 3.2.1. Device drivers and files . 15 3.2.2. Process Management . 16 3.3. 4.3BSD . 16 3.3.1. Process Management . 16 3.3.2. Interprocess Communication . 19 3.3.3. Driver Architecture . 21 3.3.4. System Start-up . 23 3.4. Linux 2.6 . 26 3.4.1. Handling Interrupts and Exceptions . 26 3.4.2. Linux I/O Architecture and device drivers . 30 3.4.3. Levels of kernel support for a device . 33 3.5. Windows 2000 . 34 3.5.1. Interrupt Handling . 34 3.5.2. I/O System . 36 3.5.3. I/O Manager . 37 3.5.4. Structure of a Driver . 39 3.5.5. Plug and Play . 40 3.5.6. Power Manager . 41 3.5.7. I/O Data Structures (ntddk.h) . 42 3.6.JX ................................................... 43 3.6.1. Architectural Overview . 44 3.6.2. Processes . 44 3.6.3. Interprocess Communication . 46 3.6.4. Device Drivers . 48 3.7.JavaOS ................................................ 50 3.7.1. Device drivers in Java . 52 3.8. Fuchsia . 52 3.8.1. System Calls and LibC . 52 3.8.2. Process Model . 54 3.8.3. Device Driver Model . 54 i 3.9. Conclusions / Comparison . 56 3.9.1. Process Model and IPC . 56 3.9.2. Driver Model . 57 4. Architecture of the interpreted Operating System PylotOS 59 4.1. Machine Model . 59 4.1.1. CPython . 60 4.1.2. Extensibility of the Interpreter . 65 4.2. Architecture . 66 4.3. Kernel Objects and System Calls . 67 4.4. Domains and Interprocess Communication (IPC) . 68 4.4.1. Context Switching . 69 4.4.2. Domain Life Cycle . 69 4.4.3. Interprocess Communication . 70 4.4.4. Name Service . 72 4.5. Device Drivers . 73 4.5.1. Driver Life Cycle . 73 4.5.2. Driver Interface . 75 4.5.3. Low Level Drivers . 75 4.5.4. The I/O Manager . 76 4.5.5. Interrupt Handling . 78 4.6. Boot-up . 78 4.7. Abstraction Module . 79 4.8. Other Approaches . 82 4.8.1. Global Object Space . 82 4.8.2. Syscalls via Exceptions . 83 4.9. Closing Remarks . 85 4.9.1. Blinking LED . 85 4.9.2. File Access . 86 4.9.3. IP Networking . 87 5. Further Research 89 6. Conclusions 91 Appendices I A. Linux File Operations . I B. Windows I/O Request Package Structure . II C. CPython Opcodes . III D. Prototypic Implementation of the Service User Mode Wrapper . V E. Prototypic Implementation of a PylotOS GPIO-driver for Raspberry Pi 1 and Zero . VI F. Prototypic Implementation of the generic Python Interrupt Handler . VIII Bibliography XI ii List of Figures 1.1. Execution models of operating systems [23] . 2 2.1. Process states and transitions . 5 3.1. Tree of processes in 4.3BSD [13] . 17 3.2. Boot-up procedure of 4.3BSD . 24 3.3. Data structures used by the generic interrupt service routine in Linux 2.6 . 28 3.4. Procedure for executing Deferred Procedure Calls (DPCs) in Windows 2000 . 36 3.5. High level view of the procedure to access hardware . 37 3.6. Layering of a file system driver and a disk driver in Windows 2000 . 39 3.7. Problematic connections in an object graph used as parameter . 48 4.1. Interpreter state, thread state and frame objects (callstack) in CPython [1] . 61 4.2. Architectural overview of PylotOS . 66 4.3. Overall driver architecture in PylotOS . 74 4.4. Plug and Play architecture of PylotOS . 77 4.5. Syscalls and the Value Stack . 84 4.6. Blinking LED example . 86 4.7. Set-up for the file access example . 87 iii Listings 3.1. Binding program of an Ethernet device driver . 54 4.1. C-definition of the PyObject structure . 60 4.2. Cells and namespaces in nested.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages112 Page
-
File Size-