Lecture - 2,3 OS Ch#1
Lecture - 2,3 OS Ch#1
Lecture - 2,3 OS Ch#1
ING SYSTEMS
Ayesha Asmat
[email protected]
TEXT BOOK
Operating Systems
Concepts, 10th
edition, Abraham
Silberschatz, Peter
Baer Galvin, Greg
Gagne; Wiley.
GRADING SCHEME
(TENTATIVE) 3
Total 100 marks
Assignment, 25 marks
Quizzes &
Class
Participation
Mid term 35 marks
Introduction to Operating-System
Operating-System Structures
Processes
Threads and Concurrency
CPU scheduling
Synchronization Tools
Deadlocks
Main Memory
Virtual Memory
File System
WHAT DOES THE TERM
OPERATING
SYSTEM
MEAN?
WHAT IS OPERATING SYSTEM
A program that acts as an intermediary between a user of a
computer and the computer hardware
Applications
OS
Hardware
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
WHAT IS OPERATING SYSTEM
User View
System View
USER VIEW
OS is a control program
Controls execution of programs to prevent errors and improper use
of the computer
OPERATING SYSTEM
Core Part of OS
“The one program running at all times on the
computer” is the kernel, part of the operating system
Computer-system operation
One or more CPUs, device controllers
connect through common bus providing
access to shared memory
Concurrent execution of CPUs and devices
competing for memory cycles
COMPUTER SYSTEM
ORGANIZATION
COMPUTER-SYSTEM
OPERATION
I/O devices and the CPU can execute concurrently
Each device controller is in charge of a particular
device type
Each device controller has a local buffer
Each device controller type has an operating system
device driver to manage it
CPU moves data from/to main memory to/from local
buffers
I/O is from the device to local buffer of controller
Device controller informs CPU that it has finished its
operation by causing an interrupt
INTERRUPT TIMELINE
COMMON FUNCTIONS OF
INTERRUPTS
Interrupt transfers control to the interrupt service
routine generally, through the interrupt vector, which
contains the addresses of all the service routines
Interrupt architecture must save the address of the
interrupted instruction
A trap or exception is a software-generated interrupt
caused either by an error or a user request
An operating system is interrupt driven
COMPUTER-SYSTEM
OPERATION
29
DIRECT MEMORY ACCESS (DMA)
• Direct memory access (DMA) is a method that allows an
input/output (I/O) device to send or receive data directly
to or from the main memory, bypassing the CPU to speed
up memory operations.
30
COMPUTER SYSTEM
ARCHITECTURE
• Single Processor Systems
• Multiprocessor Systems
• Multicore Systems
SINGLE PROCESSOR SYSTEMS
MULTIPROCESSOR SYSTEMS
MULTICORE SYSTEMS
TYPES OF OPERATING SYSTEMS
• Single programming
• Multiprogramming
• Time sharing
• Real time
– Hard real time
– Soft real time
SINGLE USER SYSTEMS
Personal computers – computer system
dedicated to a single user.
Interactive
User convenience and responsiveness.
SINGLE USER SYSTEMS
Can adopt technology developed for larger
operating systems—multi-process, multi- user
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, Linux)
BATCH SYSTEMS
First rudimentary system.
User operator
Reduce setup time by batching similar jobs
Automatic job sequencing – automatically
transfers control from one job to another.
Resident monitor :
initial control in monitor
control transfers to job
when job completes
control transfers back to monitor
MEMORY LAYOUT
MULTIPROGRAMMED SYSTEMS
P1
P2
P1
…
MULTIPROGRAMMED SYSTEMS
T
i Multiprogramming with two programs
b) 43
m
TIME-SHARING SYSTEMS