File System - Rose

Day 08
Operating systems
concepts and Processes
Functions of an OS
Some terms …

Uni-programming

Multi-programming/Time-sharing

Multi-processing
Role of interrupts in multiprogramming



When a process is waiting for I/O, CPU is
idle.
An interrupt will inform the CPU when the I/O
device is ready.
CPU can therefore run other programs while
waiting.
PROCESSES
Process



A program in execution including the state of
the PC, registers and other variables.
The entity that can be assigned to and
executed on a processor.
A unit of resource allocation.
Process description
Process Control Block



Key data structure in an Operating System
One per process
Contains process information
Process = Program code + Data + PCB
Time slice ~= 1/10th of a second
Create a process

Create a PCB (set PC, set registers, set state, set
process id)


Address space in main memory is allocated to the
process.



Type “ps -a” at prompt to get a list of process ids.
secondary memory is the hard disk, CD, floppy, etc
main memory is RAM
OS data structures are updated e.g. Process table,
memory tables, I/O tables etc
When should a process be
created?
Reasons for process termination
Process state models



The OS is responsible for interleaving the
execution of the processes.
It is important to understand the possible
behaviors of all the processes and how to
react to them.
The behavior of processes is modeled by
means of the process state model.
Two-State Process Model