Download as a PDF
Transcript
Contents 1 Introduction 1.1 Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Communication Mechanisms 2.1 Thread Control Blocks . . . . . . . . . . . . . . . . . 2.1.1 Ownership and CPUID . . . . . . . . . . . . . 2.2 The Mailbox Abstraction . . . . . . . . . . . . . . . . 2.3 Basic Interprocessor System Call . . . . . . . . . . . . 2.3.1 Operation in general . . . . . . . . . . . . . . 2.3.2 System Call Code . . . . . . . . . . . . . . . . 2.3.3 Remote Code Executed by IPI Handler . . . . 2.3.4 Sending the Interprocessor System Call Result 2.3.5 Adding IPI Handler for a New System Call . . 2.4 Special Cases . . . . . . . . . . . . . . . . . . . . . . 3 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 5 . . . . . . . . . . 5 5 6 6 7 8 9 9 9 11 11 System Call Implementation 3.1 Interprocessor Inter-Process Communication 3.2 Exchange Registers . . . . . . . . . . . . . 3.3 Scheduling . . . . . . . . . . . . . . . . . 3.3.1 Migrate . . . . . . . . . . . . . . . 3.4 Task Creation . . . . . . . . . . . . . . . . 3.5 Minimising IPI Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 13 14 14 14 15 15 Kernel Internals 4.1 Address Space Identifiers . 4.2 TLB Consistency . . . . . 4.3 Kernel Memory . . . . . . 4.4 Multiprocessor Page Tables 4.5 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 16 16 16 17 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Benchmarks 17 6 Future Work and Discussion 18 3