13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14 Introduction Chapter 1transput devices and how they are manipulated by the operating system. <strong>An</strong> abstract filestructure is often imposed on the data stored on disk. This structure is higher-level thanthe raw disk. Chapter 6 describes files and how they are implemented.5 THE KERNEL AND PROCESSESBefore we study how operating systems manage resources such as time and space, wemust first lay some foundations. In particular, you must understand how an operatingsystem represents processes and how it switches between them. The core of the operatingsystem is the kernel, a control program that reacts to interrupts from external devicesand to requests for service from processes. We have depicted the kernel in Figures 1.5and 1.6. The kernel is a permanent resident of the computer. It creates and terminatesprocesses and responds to their requests for service.5.1 Context blocksEach process is represented in the operating system by a collection of data known as thecontext block. The context block includes such information as the following. state and scheduling statistics (described in Chapter 2) use of main and backing store (described in Chapter 3) other resources held (described in Chapter 4) open transput devices (described in Chapter 5) open files (described in Chapter 6) accounting statistics privileges.We will single out several important pieces of information. Here is a Moduladeclaration that will serve our purpose:1 const2 MaxNumProcesses = 10; { the number of processes we are3 willing to let exist at any one time }4 NumRegisters = 16; { the number of registers this computer has }

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!