Table of Contents

Preface

1 Purpose and Scope
2 Organization of this Document
3 Associated Documents
4 Revision History

Chapter 1: Project Introduction

1 Introduction
2 Project Goals
3 The Z502 Machine
4 The Development Environment
5 Unrealistic Aspects of the Project
5.1 Hardware
5.2 Functionality

Chapter 2: Project Phase 1

1 Introduction
2 The Basic Interface
2.1 Kernel Service Requests
2.2 Hardware Signals
2.3 Resource Sharing
2.4 Schedulers
2.5 Process Management Interface
3 Provided Routines
3.1 Initialization Routines
3.2 Termination Routines
3.3 Scheduler Printer
4 Assignment
5 Some Final Advice

Chapter 3: Project Phase 2

1 Introduction
2 Paging
2.1 Page Faults
2.2 Page Fetch Algorithms
2.3 Page Replacement Algorithms
2.4 Page Tables
2.5 Frame Tables
2.6 Shared Memory Mechanism
3 Disk Drives
3.1 Bit Map
3.2 Other
4 Provided Routines
5 Project Phase 2 Assignment
6 Final Advice

Appendix A: The Z502 Machine

1 Overall Architecture
2 Memory
3 Registers
4 The User Mode Instruction Set
4.1 Register Usage
4.2 System Calls
5 Kernel Mode Instruction Set
5.1 I/O Primitives
5.2 Memory Access Instructions
5.3 Context Switching Primitives
5.3.1 What is a Context?
5.3.2 Primitives that Manipulate Contexts
5.4 Other Hardware Primitives
6 Interrupts, traps, faults, and Operating System Invocation
6.1 Reasons for Exceptions
6.2 Masking Interrupts
6.3 Vector Nitty-Gritty
7 Device Notes
7.1 Disk
7.2 Delay Timer
8 Address Translation
8.1 Virtual Memory
8.2 Page Table Setup
9 Configurations
10 Bootstrapping

Appendix B: Test Programs

1 Introduction
2 Use of Registers and Arguments
3 Program Attributes
3.1 Portability
4 User Test Programs
4.1 test1a
4.2 test1b
4.3 test1c
4.4 test1d
4.5 test1e
4.6 test1f
4.7 test1g
4.8 test1h
4.9 test1I
4.10 test1j
4.11 test1k
4.12 test2a
4.13 test2b
4.14 test2c
4.15 test2d
4.16 test2e
4.17 test2f
4.18 test2g

Appendix C: User System Calls

1 Introduction
2 System Call Parameters
3 Use of CALL and ZCALL
4 Systems Calls
4.1 GET_TIME_OF_DAY
4.2 SLEEP
4.3 CREATE_PROCESS
4.4 GET_PROCESS_ID
4.5 TERMINATE_PROCESS
4.6 SUSPEND_PROCESS
4.7 RESUME_PROCESS
4.8 CHANGE_PRIORITY
4.9 SEND_MESSAGE
4.10 RECEIVE_MESSAGE
4.11 MEM_READ, MEM_WRITE, and READ_MODIFY
4.12 DISK_READ
4.13 DISK_WRITE
4.14 DEFINE_SHARED_AREA

Appendix D: Scheduler Printer and Output Philosophy

1 Using the Scheduler Printer
1.1 Introduction
1.2 Using SP_setup
1.3 Using SP_print_header
1.4 Using SP_print_line
2 Printing Philosophy
2.1 Scheduler Output
2.2 Test Output
2.3 Error and Trap Handling
3 An Example of scheduler_printer Output