Académique Documents
Professionnel Documents
Culture Documents
• Sanjay Gupta
• Rajeev Shorey
Guest Lectures
• Dr. Sorav Bansal, CSE Department, IIT Delhi
• Possibly others
Useful Details
• Textbook
– Operating System Concepts, 8th edition, by Silberschatz, Galvin and
Gagne
– OS by Andrew Tanenbaum
– OS by William Stallings
• Revised Class Timings
– Prefer two classes of one and a half hour each
– Monday
• Lab: 2:30 – 4:30 PM
• Class: 4:30 – 6:00 PM
– Wednesday
• Class: 3:30 – 5:30 PM
• Time slot for Doubts/Clarifications
• We will keep a one hour time slot per week to clarify doubts from
students
Useful Web Sites
UNIX Guru Universe: Excellent source of UNIX information.
Linux Documentation Project: The name describes the site.
Windows Development: Good source of information on Windows internals. Note especially the section on
Windows Base Services.
The comp.os.research FAQ: Lengthy and worthwhile FAQ covering operating system design issues.
ACM Special Interest Group on Operating Systems. Information on SIGOPS publications and conferences.
IEEE Technical Committee on Operating Systems and Applications. Includes an online newsletter and links to
other sites.
IEEE Computer Society Task Force on Cluster Computing An international forum to promote cluster computing
research and education.
Beowulf Central soure of information on Beowulf clusters..
The Memory Management Reference A good source of documents and links on all aspects of memory
management.
The Operating System Resource Center A useful collection of documents and papers on a wide range of OS
topics.
Operating System Technical Comparison Includes a substantial amount of information on a variety of
operating systems.
Review of Operating Systems A comprehensive review of commerical, free, research and hobby OSs.
I/O Characterization and Optimization A facility dedicated to education and research in the area of I/O design
and performance. Useful tools and tutorials. Operated by the U. of Illinois.
Object Management Group Industry consortium that promotes CORBA and related object technologies.
Grading: Weightage
User Interfaces
System Calls
H
Program I/O File Resource
Communication Accounting
Execution Operation Systems Allocation
Error Protection &
Detection SERVICES Security
Operating System
Hardware
Focus of this Course
Terminology
• Concurrency
• Multitasking, Time Sharing, Processor Sharing
• Multiprocessing
• Multithreading
• Multiprogramming
• Context Switching
• Thrashing
• …
Abstraction
• What if? The entire software stack was one giant event-driven
loop
– Possible, BUT clumsy
– Certainly not practical for general purpose computers
• Better way:
– Separate software into layers of abstraction
• e.g., OS -> JVM -> Java bytecode
– All programs are written (or compiled) to the abstraction
provided by the OS
• Abstractions may be different for different OS’es
– e.g., Windows program will not run on Linux even
though same underlying hardware
Operating System: System View
• An OS is a Resource Allocator
• Examples of Resources
– CPU Time
– Memory space
– File-Storage space
– I/O devices
• OS acts as a Manager of these resources
• OS faces numerous and possibly conflicting requests
for resources
• OS must decide how to allocate the requests to specific
programs and users
– Challenge: Need to operate the Computer System
“Efficiently” and “Fairly”
Question
• What do you mean by “efficiently”?
• What do you mean by “fairly”?
Operating Systems Structure
• Let’s understand Multiprogramming and Time Sharing
• Multiprogramming
– The Key idea is to keep the CPU busy most of the times
– CPU is an important resource and should not idle
Operating System
Job 3
Job 4
Take Away
• Multiprogrammed systems provide an
environment in which various systems
resources are utilized effectively, but they do
not provide for user interaction with the
computer system
Time Sharing or Processor Sharing
or Multitasking
Processor
Job Queue or
Server
Quantum (δ)
• Concurrency
• Multitasking
• Multiprocessing
• Multithreading
• Multiprogramming
• Context Switching
• Thrashing
• …
Example:
CPU Scheduling (is Fun)
Scenario #1
Ready Queue
C B A
2ms 1ms 100ms
FCFS
Avg:
A B C
101.3
time 100 101 103
Round Robin
Avg:
A B C A C A
36.7
time 2 5 103
Scenario #2
Ready Queue
C B A
10ms 10ms 10ms
FCFS
Avg:
A B C
20
time 10 20 30
Round Robin
A B C A B C ... A B C A B C
Avg:
29
time 28 29 30
Scenario #1
Ready Queue
C B A
2ms 1ms 100ms
FCFS
Avg:
A B C
101.3
time 100 101 103
Round Robin
Avg:
A B C A C A
36.7
time 2 5 103
STCF
Avg:
B C A
35.7
1 3 103
Scenario #2
Ready Queue
C B A
10ms 10ms 10ms
FCFS
Avg:
A B C
20
time 10 20 30
Round Robin
A B C A B C ... A B C A B C
Avg:
29
time 28 29 30
STCF
Avg:
A B C
20
time 10 20 30
Next Class
• Topics that we will cover
– High Level Overview – to begin with !
– Process Management
– Memory Management
– Storage Management
– Protection & Security
– Distributed Systems
– Special Purpose Systems
Lessons Learned
• Resources in Computer and Communication
Systems are always finite
– Computer Systems: Operating Systems
• Question: What are some of the resources?
– Communication Systems: Networks
• Question: What are some of the resources?
• Resources “Cost”, nothing is free !
• Therefore, we need to “Optimize” Resource
Consumption
More Terminology
• Efficiency
• Fairness
• Speedup
• Throughput
• Scalability
• Reliability
• Fault-Tolerance
• Availability
• …
Efficiency
• Fraction of time a resource is busy or utilized
• Example:
– CPU is busy 96% of time
– Efficiency is .96
Fairness
• Fairness can be defined in several ways
– Proportional fairness
– Max-Min fairness
Resource
Bandwidth
or
CPU
TIME
Speedup
• A term used in Parallel Processing heavily
• Suppose
– T_1: Time taken on a Uniprocessor
– T_N: Time taken on a Multiprocessor with N
nodes
• Then,
Operating System
Job K N>K
N
CPU Scheduling
Processor
or
Server
User Process
User Process Return from User Mode
Calls System Call Mode Bit = 1
Executing System Call
TRAP TRAP
Kernel Mode bit = 0 Mode bit = 1 Kernel Mode
Execute System Mode Bit = 0
Call
The state information must be saved when an interrupt occurs, to allow the process
to be continued later
Process Scheduling: Queueing Diagram
Representation
Termination