Lecture No. 1
Lecture No. 1
Lecture 1
Introduction
Operating System Concepts – 10th Edition 1.1 Silberschatz, Galvin and Gagne
©2018
Myself
Email: [email protected]
Office: STD PHD-Faculty Hall (402), Office # 10
University of Management and Technology
Operating System Concepts – 10th Edition 1.2 Silberschatz, Galvin and Gagne
©2018
Books and Resources
Operating System Concepts – 10th Edition 1.3 Silberschatz, Galvin and Gagne
©2018
Course outline
Introduction
Processes, Inter-process
communication,
Threads
Synchronization, Semaphores,
Deadlocks
CPU Scheduling
Memory management
File-system management
……
Operating System Concepts – 10th Edition 1.4 Silberschatz, Galvin and Gagne
©2018
Class Rules & Regulations
Quizzes
All quizzes will be Announced
Quizzes will have more weightage as compared to Assignments
Assignments
In case of copied, all remaining assignment will be marked Zero
Avoid late submission, No assignment will be entertained after deadline
Attendance
Don’t mark Proxy of your friend (If he/she is your real friend )
In case of proxy, 5 Absences will be marked to that student
In case of emergency, get permission personally or send an email with CC
to CR if gets approval then CR will remind me to entertain that request.
Attend all classes regularly, no attendance issue will be entertained in the
end of semester
Operating System Concepts – 10th Edition 1.5 Silberschatz, Galvin and Gagne
©2018
Are you ready !!!!
Lets Begin
Operating System Concepts – 10th Edition 1.6 Silberschatz, Galvin and Gagne
©2018
Operating Systems
Answer
This is what the operating system does
Operating System Concepts – 10th Edition 1.7 Silberschatz, Galvin and Gagne
©2018
What is an Operating System?
Operating System Concepts – 10th Edition 1.8 Silberschatz, Galvin and Gagne
©2018
What is an Operating System?
It is a program!
User’s view
Provides an extended or virtual machine abstraction to user programs
Easier to program than the underlying hardware
All services are invoked and accomplished through system calls
System view
Acts as a resource manager of a complex system
Resources consist of processors, memories, timers, disks,
keyboard, network interfaces, printers etc.
OS manages allocation of these resources to user programs in an
orderly and controlled manner
Operating System Concepts – 10th Edition 1.9 Silberschatz, Galvin and Gagne
©2018
What is an Operating System?
OS do nothing by themselves
Operating System Concepts – 10th Edition 1.10 Silberschatz, Galvin and Gagne
©2018
Two Goals of Operating Systems
Operating System Concepts – 10th Edition 1.11 Silberschatz, Galvin and Gagne
©2018
Manager/Coordinator of Resources
Operating System Concepts – 10th Edition 1.12 Silberschatz, Galvin and Gagne
©2018
Resource multiplexing
OS multiplexes resources in two ways:
In time
Time multiplexing involves different programs taking
turns in using the resource.
Example:
CPU scheduling
printer sharing
In space
Space multiplexing involves different program getting
part of the resource possibly at the same time
Example:
memory is divided into several running programs
Operating System Concepts – 10th Edition 1.13 Silberschatz, Galvin and Gagne
©2018
What If No Operating System?
Operating System Concepts – 10th Edition 1.14 Silberschatz, Galvin and Gagne
©2018
…Lets go back to the “stone age”
of computing…
Operating System Concepts – 10th Edition 1.15 Silberschatz, Galvin and Gagne
©2018
Early Systems
No Operating systems,
your Data and your
Programs
X = X + 1; As
Load Register1, x
Load Register2, 1
Direct Register3, Register2,
Add Register1 Register3, x
Store
Time slots allocated to scientists
Enter programs using binary
switches
Operating System Concepts – 10th Edition 1.16 Silberschatz, Galvin and Gagne
©2018
Early Systems
Problem:
computer remains idle while programmer sets
things up
Poor utilization of huge investment
Solution:
Hire a specialized person to do setup
Problem:
Faster than programmer, but still a lot slower
than the machine
Solution:
Build a batch monitor
Operating System Concepts – 10th Edition 1.17 Silberschatz, Galvin and Gagne
©2018
The Monitor
The monitor is the special program that manages the sequential
execution of jobs in a batch.
Operating System Concepts – 10th Edition 1.19 Silberschatz, Galvin and Gagne
©2018
The Resident Monitor
Operating System Concepts – 10th Edition 1.20 Silberschatz, Galvin and Gagne
©2018
Why study operating systems?
Point of describing change isn’t “Look how stupid batch
processing is” – it was right for tradeoffs of the time, but not
anymore
Point is: have to change with changing technology
Situation today is much like it was in the late 60’s
OS’s today are enormous, complex things
100k's of lines (or >1M lines)
Windows NT is 20M lines
Windows2000 and Windows XP are about 40M lines.
Key aspect of this course, understand OS’s so we can
simplify them!
Operating System Concepts – 10th Edition 1.21 Silberschatz, Galvin and Gagne
©2018
Beyond batch processing systems
Operating System Concepts – 10th Edition 1.22 Silberschatz, Galvin and Gagne
©2018
Multiprogramming
Execute multiple jobs simultaneously
But a CPU can execute a single instruction at a
time???
One job can use the CPU while the other is waiting
for I/O
Operating System Concepts – 10th Edition 1.23 Silberschatz, Galvin and Gagne
©2018
Requirements for
Multiprogramming
Hardware support:
I/O interrupts and (possibly) DMA(Direct memory
access)
OS requests I/O, goes back to computing, gets interrupt when I/O
device finishes
Memory management
several ready-to-run jobs must be kept in memory
Memory protection (data and programs)
Software support from the OS:
Job Scheduling
Which ready jobs should be brought to memory
CPU Scheduling
Which program is to be run next
Operating System Concepts – 10th Edition 1.24 Silberschatz, Galvin and Gagne
©2018
Multiprogramming
Turn-Around Time
The length of time between the start of the job and
when the output was done
Operating System Concepts – 10th Edition 1.25 Silberschatz, Galvin and Gagne
©2018
Time Sharing System (TSS)
Processor’s time is shared among multiple users
Operating System Concepts – 10th Edition 1.26 Silberschatz, Galvin and Gagne
©2018
Time Sharing System (TSS)
Operating System Concepts – 10th Edition 1.27 Silberschatz, Galvin and Gagne
©2018
Personal Computing
Operating System Concepts – 10th Edition 1.28 Silberschatz, Galvin and Gagne
©2018
Distributed Computing
Operating System Concepts – 10th Edition 1.29 Silberschatz, Galvin and Gagne
©2018
OS
Overview
Operating System Concepts – 10th Edition 1.30 Silberschatz, Galvin and Gagne
©2018
The Operating System controls the
machine
gc gd
c OS b
User gre
dif Kernel
Application f Har p
v d dat
Operating war e
i
System e
xter emac
Hardware m
s netscape
Operating System Concepts – 10th Edition 1.31 Silberschatz, Galvin and Gagne
©2018
A better picture
many
applications
Applicati
on Syste
m
One Operating
calls
System
Operatin One Hardware
g
Machine
System
instructio
Privileged
ns
Hardwar instructio
ns
e
Operating System Concepts – 10th Edition 1.32 Silberschatz, Galvin and Gagne
©2018
Operating System in Action
OS is a program, just like any other program
When you turn power on, bootstrap program is loaded from ROM
Bootstrap program
Examine/check machine configuration
# CPUs
How much memory
# and type of HW devices
Build configuration structure describing the HW
Locates and Loads the OS
The control transfers to the OS
Operating System Concepts – 10th Edition 1.33 Silberschatz, Galvin and Gagne
©2018
Operating System in Action
Operating System:
Initialize kernel data structures
Operating System Concepts – 10th Edition 1.34 Silberschatz, Galvin and Gagne
©2018
References
http://en.wikipedia.org/wiki/Time-sharing
http://en.wikipedia.org/wiki/Operating_system
http://en.wikipedia.org/wiki/Distributed_computin
g
Operating System Concepts – 10th Edition 1.35 Silberschatz, Galvin and Gagne
©2018
End