Lecture 01
Lecture 01
System
Professor Mangal Sain
Lecture 1
COURSE INTRODUCTION
3
SUBJECT INTRODUCTION
This course examines the important problems in
operating system design and implementation. The
operating system provides an established, convenient,
and efficient interface between user programs and the
bare hardware of the computer on which they run.
6
BOOK REFERENCE
Operating System Concepts by
Silberschatz, Abraham; Gagne, Greg;
Galvin, Peter B..
Distributed system- principle and
paradigms by Andrew S. Tanenbaum
and Maarten Van Steen
Scientific papers and other material
will be listed during the course and will
be made available through the site
EVALUATION
Attendance : 10%
Mid Term : 20%
Assignment : 20%
Participation : 10%
Final Exam : 40%
Lecture 1 – Part 1
Introduction
INTRODUCTION
● What is an operating system?
● Operating Systems History
● Simple Batch Systems
● Multiprogrammed Batch Systems
● Time-sharing Systems
● Personal Computer Systems
● Parallel and Distributed Systems
● Real-time Systems
WHAT IS AN OPERATING SYSTEM?
● An OS is a program that acts an intermediary
between the user of a computer and computer
hardware.
● Major cost of general purpose computing is
software.
● OS simplifies and manages the complexity of running
application programs efficiently.
COMPUTER SYSTEM COMPONENTS
● Hardware
● Provides basic computing resources (CPU, memory, I/O devices).
● Operating System
● Controls and coordinates the use of hardware among application
programs.
● Application Programs
● Solve computing problems of users (compilers, database
systems, video games, business programs such as banking
software).
● Users
● People, machines, other computers
ABSTRACT VIEW OF SYSTEM
User
User User User
1
2 3 .. n
.
compiler assembler Text editor Database
system
System and Application Programs
Operating System
Computer
Hardware
OPERATING SYSTEM VIEWS
● Resource allocator
● to allocate resources (software and hardware) of the
computer system and manage them efficiently.
● Control program
● Controls execution of user programs and operation of I/O
devices.
● Kernel
● The program that executes forever (everything else is an
application with respect to the kernel).
OPERATING SYSTEM ROLES
• Referee
• Resource allocation among users, applications
• Isolation of different users, applications from each other
• Communication between users, applications
• Illusionist
• Each application appears to have the entire machine to itself
• Infinite number of processors, (near) infinite amount of
memory, reliable storage, reliable network transport
• Glue
• Libraries, user interface widgets, …
• Reduces cost of developing softwarea
EXAMPLE: FILE SYSTEMS
• Referee
• Prevent users from accessing each other’s files without
permission
• Illusionist
• Files can grow (nearly) arbitrarily large
• Files persist even when the machine crashes in the middle of a
save
• Glue
• Named directories, printf, …
GOALS OF AN OPERATING SYSTEM
● Simplify the execution of user programs and
make solving user problems easier.
● Use computer hardware efficiently.
● Allow sharing of hardware and software resources.
● Make application software portable and versatile.
● Provide isolation, security and protection among
user programs.
● Improve overall system reliability
● error confinement, fault tolerance, reconfiguration.
WHY SHOULD I STUDY OPERATING
SYSTEMS?
● Need to understand interaction between the hardware
and applications
● New applications, new hardware..
● Inherent aspect of society today
● Need to understand basic principles in the design of
computer systems
● efficient resource management, security, flexibility
● Increasing need for specialized operating systems
● e.g. embedded operating systems for devices - cell phones,
sensors and controllers
● real-time operating systems - aircraft control, multimedia
services
COMPUTER SYSTEM ARCHITECTURE (TRADITIONAL)
SYSTEMS TODAY
Irvine Sensorium
HARDWARE COMPLEXITY
INCREASES
From Berkeley OS course
Moore’s Law: 2X transistors/Chi
p Every 1.5 years Intel Multicore Chipsets
Moore’s
Law
$/
SOFTWARE COMPLEXITY INCREASES
● Interactive (action/response)
● when OS finishes execution of one command, it seeks
the next control statement from user.
● File systems
● online filesystem is required for users to access data and
code.
● Virtual memory
● Job is swapped in and out of memory to disk.
PERSONAL COMPUTING SYSTEMS
Hardware – cheap ; Human – expensive
●Single user systems, portable.
●I/O devices - keyboards, mice, display screens, small
printers.
●Laptops and palmtops, Smart cards, Wireless devices.
●Single user systems may not need advanced CPU
utilization or protection features.
●Advantages:
● user convenience, responsiveness, ubiquitous
PARALLEL SYSTEMS
● Multiprocessor systems with more than one CPU
in close communication.
● Improved Throughput, economical, increased
reliability.
● Kinds:
• Vector and pipelined
• Symmetric and asymmetric multiprocessing
• Distributed memory vs. shared memory
● Programming models:
• Tightly coupled vs. loosely coupled ,message-based vs. shared
variable
PARALLEL COMPUTING SYSTEMS
ILLIAC 2 (UIllinois)
Climate modeling, ear
thquake simulations, g
enome analysis, protei
n folding, nuclear fusi
on research, …..
K-computer(Japan)
Tianhe-1(China)
● client/server architectures
● Advantages:
• resource sharing
• computation speed-up
• reliability
• communication - e.g. email
49
SUMMARY OF LECTURE
● What is an operating system?
● Early Operating Systems
● Simple Batch Systems
● Multiprogrammed Batch Systems
● Time-sharing Systems
● Personal Computer Systems
● Parallel and Distributed Systems
● Real-time Systems
Lecture 1 – Part 3
• Storage architecture
• OS organization
• OS tasks
• Virtual Machines
COMPUTER SYSTEM ORGANIZATION
CPU EXECUTION Addr 232-1
R0
…
R31
F0
Fetch …
… Exec Data1
F30
PC Data0
Inst237
Inst236
…
• Execution sequence: Inst5
• Fetch Instruction at PC Inst4
• Decode Inst3 PC
• Execute (possibly using registers) Inst2 PC
• Write results to registers/mem Inst1 PC
• PC = Next Instruction(PC) Inst0 PC
• Repeat
Addr 0
From Berkeley OS course
COMPUTER SYSTEM ORGANIZATION
I/O devices
I/O DEVICES
60
PROCESS ABSTRACTION
• Process: an instance of a program, running
with limited rights
PROCESS ABSTRACTION AND RIGHTS
• Process: an instance of a program, running
with limited rights
• CPU Protection:
• Dual Mode Operation
• Timer interrupts
• Memory Protection
• I/O Protection
CPU PROTECTION
• OS is responsible for
• File creation and deletion
• Directory creation and deletion
• Supporting primitives for file/directory manipulation.
• Mapping files to disks (secondary storage).
• Backup files on archival media (tapes).
OS TASK: PROTECTION AND SECURITY
• Simple
• Only one or two levels of code
• Layered
• Lower levels independent of upper levels
• Modular
• Core kernel with Dynamically loadable modules
• Microkernel
• OS built from many user-level processes
OS STRUCTURE - SIMPLE APPROACH
Physical Machine
Application
OS
Hardware
VIRTUAL MACHINES
OS OS OS
Hardware
VIRTUAL MACHINES
• Use cases
●Resource configuration
●Running multiple OSes, either the same or different
OSes
●Run existing OS binaries on different architecture
SUMMARY OF LECTURE SET 1