INTRODUCTION
TO
OPERATING SYSTEMS
Lecture 3: THE KERNEL OF THE OPERATING SYSTEM (1)
CHRIS STAFF
Dept. of Computer Science and Artificial Intelligence
University of Malta
Lecture Outline
Aims and Objectives
The Operating System Kernel
Representing Processes
Interrupts and Interrupt Handling
The Interrupt Handler
Summary
Aims and Objectives
- To describe the Kernel of the Operating System
- To describe the Purpose of the Kernel
- To describe the functionality of the Kernel within our Paper Operating
System
- Interrupts and Interrupt Handling
The Operating System Kernel
- Represented at Layer 1 in Hierarchical Model

- Functions of the kernel are available to the other software layers,
and to users.
Typical services provided by the Kernel
- Interprocess communiction and synchronisation.
- Interrupt Handling
- Process Management
- Booting & Start-up of the initial System configuration
- Additional Functions, e.g., System Clock
Representing Processes
- All information needs to be represented internally in order to be
manipulated.
- A Data Structure is a `template' for representing associated information.
Each Data Structure has a name, and contains `slots' for holding information.
(e.g., STRUCT in C, or Records and Fields in most other languages)
- A Process is represented by a Process Descriptor, containing (initially)
- Name
- Status (Running, Runnable, Unrunnable)
A Structure of Structures
- All Process Descriptors are linked together to form Process Structure.
- The Process Structure holds all information about all Processes in the
system. The Process Structure changes as new processes are created and old ones
terminate.
The Central Table.
- The Operating System holds a main Data Structure, the Central Table, which is
used to point at (Link into) all system data structures, including the process
structure.

Summary
- Each process is described by a Process Descriptor.
- All process Descriptors are linked together by a Process Structure, pointed
at from the Central Table.
Interrupts and Interrupt Handling
Different types of interrupt
- Supervisor call interrupt
- I/O interrupt
- External interrupt
- Restart interrupt
- Program check interrupt
- Machine check interrupt
The Interrupt Handler.
- Interrupts are handled by the First Level Interrupt Handler.
- Need to save Volatile Environment & Program Counter
- Save it in Process Hardware Descriptor
- If Hardware does not perform Context Switch, FLIH Must.
- FLIH must determine the source of interrupt, so that the proper interrupt
service routine can be dispatched.
- Source identified by polling (Skip Chain), or load address of ISR into
Program Counter.
- Each type of interrupt has its own ISR. While executing, ISR should not be
interrupted, so it should do as little work as possible.
- FLIH must not be interrputed by interrupts of equal or lower priority.
Summary
- Described services that are provided by the Kernel
- Seen how processes are represented and how the OS maintains processes
- Described different types of Interrupt and the way some of them are handled
Next Lecture...
The Kernel of the Operating System (2)