You are on page 1of 24

Operating System

Department of Electrical Engineering


Shehzad Ahmad
Class Discipline
 Never ever miss a class
 Reach the class on time
 Show responsible behavior by not entering or

leaving the class after the lecture has started


 Be attentive, don’t distract the teacher by working

on assignments of other courses or talking


 Don’t attempt to mark proxy attendance

2
Dishonesty, Plagiarism

 All parties involved in any kind of cheating in any


exam (Quizzes, Assignments) will get minus (-)
100% in that exam
 Plagiarism in Project will lead to F Grade in the

course
Pre-Requisites
 Must have passed Data Structures
 Familiar with programming C/C++
Books
 Text Book:
◦ Operating System Concepts, 9th /10th Editon,
Silberschatz Galvin Gagne

 Reference Books:
◦ Modern Operating Systems, 3rd Edition, Andrew S.
Tanenbaum
Tentative Evaluation Breakdown

Assignments 10

Quizzes 10

Projects 10

Mid Exam 25

CP 5

Final 40

Total 100
Computer System

1. Hardware
2. Operating system
3. Applications programs
4. Users
Computer System Layered Model
Computer System Layered Model
◦ Hardware – provides basic computing resources
 CPU, memory, I/O devices
◦ Operating system
 Controls and coordinates use of hardware among
various applications and users
◦ Application programs – define the ways in which
the system resources are used to solve the
computing problems of the users
 Word processors, compilers, web browsers,
database systems, video games
◦ Users
 People, machines, other computers
Purpose of a Computer System

 Computer systems consist of


software and hardware that are
combined to provide a tool to solve
specific problems in an efficient
manner
 Execute programs
Course Outline
 Operating systems Types
 Operating system structures
 Processes and threads—scheduling, concurrency,

synchronization, etc.
 Deadlocks
 Memory management
 Virtual memory
 File system
 Secondary storage management

11
What is Operating System ?
 Top Down View:
A program that acts as an intermediary between a user
of a computer and the computer hardware—provides the
user a simpler (virtual) machine to work with.

 Bottom Up View:
A program that allocates and deallocates computer
system resources in an efficient, fair, and secure manner
—a resource manager

12
Operating System Goals
 Execute user programs and make solving user
problems easier.
 Make the computer system convenient to use.
 Use the computer hardware in an efficient manner.
Types of Systems
 Single User Systems
 Batch Systems
 Multiprogrammed Systems
 Time Sharing Systems
 Real Time Systems

14
Single User Systems
 Personal computers – computer system dedicated
to a single user.
 Interactive
 User convenience and responsiveness
 Individuals usually have sole use of computer and

do not need advanced protection features.


 May run several different types of operating

systems (Windows, MacOS, Unix and Linux)

15
Batch Systems
Why do we need Batch System:
 Historical Perspective

16
Batch Systems
 Reduce setup time by batching similar
jobs
 A special program, the monitor, manages

the execution of each program in the


batch systems

 Monitor
automatically transfers control
from one job to another.

17
Memory Layout
Multiprogrammed Systems
 Reduce setup time by batching similar
jobs
 A special program, the monitor, manages

the execution of each program in the


batch systems

 Monitor
automatically transfers control
from one job to another.

19
Multiprogrammed Systems

Several processes/jobs
are kept in main memory
at the same time, and the
CPU is multiplexed
among them.
Multiprogrammed Systems

Example: Two processes P1 and P2 with CPU


and I/O bursts of one time unit each
CPU I/O
Burst Burst
P1
P2
P1

P2
OS Features Needed for
Multiprogramming
 Memory management
 CPU scheduling

22
Time Sharing Systems
 An interactive system with multiprogramming

 On-line file system must be available for users to


access data and code.

 Examples: Unix and Linux

23
Real Time Systems
 Well-defined fixed-time constraints.

 Often used as a control device in a dedicated


application such as controlling scientific
experiments, medical imaging systems, industrial
control systems, and some display systems.

24

You might also like