Professional Documents
Culture Documents
Oct-03 1
Course Introduction
This course will provide an overview of most Operating
Systems.
It describes the requirements of most Operating Systems and
the common techniques used to achieve these requirements.
Course is split up in lectures followed by a test (50%) and a
coursework (50%).
These course notes will be provided in .pdf format
Reference textbooks:
– Silberschatz, A. and Galvin. P.B., Operating Systems
Concepts. Addison Wesley.
– Deitel, H.M., 1990, Operating Systems.
Please send me an e-mail on:
– jcord@cs.um.edu.mt
Course builds up on knowledge of previous lectures so be sure
to cover everything by the next lecture.
Lecture attendance is obligatory.
Lecture Notes available at
– www.cs.um.edu.mt/~jcord
Oct-03 2
Introduction
What is an Operating System?
Operating System Functions
Operating System Types
History of Operating Systems
Oct-03 3
Basic Concepts
Process: Instance of a program in execution
CPU: executes Processes; CPU is given a
machine instruction, it executes it and
automatically executes the following
instruction (exception with jmp instructions)
Resource: A component of a computer
system for which processes can compete
Scheduling: The process of allocating a CPU
to start or resume execution of a process.
Oct-03 4
What is an Operating System?
It is just a program.
A program that acts as an intermediary
between a user of a computer and the
computer hardware.
Directs the processor in the use of
system resources
Uses the computer hardware in an
efficient manner.
Must be reliable and make good use of
resources
Oct-03 5
Operating Systems Functions
Resource Sharing
– A user or multiple users together with multiple
processes are able to share resources between
them
Provision of a Virtual Machine
– Provide users with a usable form of the underlying
hardware
• IO
• Memory
• Filing System
• Protection and Error Handling
• Program Interaction
• Program Control
Oct-03 6
Operating System Types
No of Users
– Single User
• One user at a time (Windows 98)
– Multiple Users
• Many concurrent logged sessions (UNIX).
• Each user is given impression that he is the sole user of the
machine (Virtual Machine)
Multi-Programming
– When a process has to wait for an IO to terminate, the CPU
is scheduled to another process.
Multi-Tasking
– Several processes are executed apparently in parallel by
sharing system resources. Multi-Tasking implies Multi-
Programming.
Oct-03 7
Computer System Components
1. Hardware – provides basic computing
resources (CPU, memory, I/O devices).
2. Operating system – controls and coordinates
the use of the hardware among the various
application programs for the various users.
3. Applications programs – define the ways in
which the system resources are used to solve
the computing problems of the users
(compilers, database systems, video games,
business programs).
4. Users (people, machines, other computers).
Oct-03 8
Abstract View of System Components
Oct-03 9
Operating System Definitions
Resource allocator – manages and
allocates resources.
Control program – controls the
execution of user programs and
operations of I/O devices .
Kernel – the one program running
at all times (all else being
application programs).
Oct-03 10
First Computers
Oct-03 11
Batching Systems- 1st OS
The first OS was a human being.
Operator fed jobs to the machine one by
one (using punch tapes and cards).
Setup time was reduced by batching
similar jobs.
When things went wrong, the operator
has to sort out the problem.
The CPU was idle when such problems
were being sorted out.
Oct-03 12
1st Programmed OS
A small program was built which automatically
transferred the CPU to the next job. Automatic job
sequencing.
This resident monitor executed the following loop:
– Initial control in monitor.
– Control transfers to job.
– When job completes control transfers back to monitor.
Monitor knew which job to execute next by using
control cards fed by operator.
This system starts to provide to user-computer
interaction.
Unfortunately CPU was still idle due to slow I/O.
Oct-03 13
Memory Layout for a Simple Batch
System
Oct-03 14
Multi-Programmed Batch
Systems
With the advent of
cheaper and more
efficient memory, many
jobs started being placed
in memory.
The OS could allocate
the processor to another
job whenever the current
one has to wait for a
command or for an I/O
device operation.
Oct-03 15
Advantage of Multi-Programming
Run Run
A Wait B Wait
Time
Time
Oct-03 16
OS Features Needed for
Multiprogramming
For Batch Multi-Programming the OS
has to become smarter.
– I/O routine supplied by the system.
– Memory management – the system must
allocate the memory to several jobs.
– CPU scheduling – the system must choose
among several jobs ready to run.
– Hard Disk started being used to store a
multitude of jobs.
– Allocation of devices.
Oct-03 17
Spooling
Oct-03 19
Time-Sharing Systems–Interactive
Computing (cont)
When memory is full, a job swapped in and out of
memory to the disk.
On-line communication between the user and the
system is provided; when the operating system
finishes the execution of one command, it seeks the
next “control statement” from the user’s keyboard.
On-line system must be available for users to access
data and code.
This system also allows more than one user to utilize
the system, giving the impression that he has
immediate access to his processes.
This made today’s PC possible.
Oct-03 20
End of Section
Oct-03 21