0% found this document useful (0 votes)
51 views38 pages

Operating System: Ajaz Khan Baig

This document provides an overview of operating system concepts including computer system structures, batch processing systems, multiprogramming, time-sharing systems, distributed systems, real-time systems, I/O structures, interrupts, and storage structures. It discusses the evolution of systems from batch processing to time-sharing and distributed systems. It also covers concepts like interrupts, I/O handling, synchronous vs asynchronous I/O, and storage hierarchies.

Uploaded by

lovely person
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views38 pages

Operating System: Ajaz Khan Baig

This document provides an overview of operating system concepts including computer system structures, batch processing systems, multiprogramming, time-sharing systems, distributed systems, real-time systems, I/O structures, interrupts, and storage structures. It discusses the evolution of systems from batch processing to time-sharing and distributed systems. It also covers concepts like interrupts, I/O handling, synchronous vs asynchronous I/O, and storage hierarchies.

Uploaded by

lovely person
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 38

OPERATING SYSTEM

AJAZ KHAN BAIG

Class : BSSE SEMESTER 4


Credit Hours ( 3+1)
Lecture 3

Computer system structure

BOOK:
Operating System Concepts
by Silberschatz and Galvin , 8 th
Edition
08/25/20 2
 Review of OS Environments
 Computer-System Structures
Computer System Operation
Interrupts
 Interrupts handling
 I/O Structure
 Storage Structure
 Storage Hierarchy
 Hardware Protection
 General System Architecture

08/25/20 3
Batch processing:

08/25/20 4
Problems:
 Lack of interaction between the user and job.

 CPU is often idle, because the speeds of the mechanical I/O
devices are slower than CPU.

 Difficult to provide the desired priority.

08/25/20 5
Mainframe Systems:
 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 pack to monitor

08/25/20 6
Multi-programmed Batch Systems

 Several jobs are kept in main memory at the same time

 and the CPU is multiplexed among them.

08/25/20 7
Multiprogramming:

08/25/20 8
 OS Features Needed for Multiprogramming:

I/O routine supplied by the system.

Memory management – the system must allocate the memory to


several jobs.

CPU scheduling – the system must choose among several jobs ready to
run.

Allocation of devices

08/25/20 9
 Time-sharing or multitasking is a logical extension of multiprogramming.

 Processor's time which is shared among multiple users

 Time-Sharing Systems objective is to minimize response time.

 Multiple jobs are executed by the CPU by switching between them

 Execute each user program in a short burst or quantum of computation.

 Operating system uses CPU scheduling and multiprogramming to provide each user
with a small portion of a time.

08/25/20 10
Multitasking:

08/25/20 11
Advantages:

 Provide advantage of quick response.

 Avoids duplication of software.

 Reduces CPU idle time.

08/25/20 12
 Problem of reliability (dependability ,uniformity  regularity) .

 Question of security and integrity (dependability, honesty,


truthfulness) of user programs and data.

 Problem of data communication.

08/25/20 13
 Distributed systems use multiple central processors to serve
multiple real time application
 Data processing jobs are distributed among the processors

 processors communicate with one another through various


communication lines
 Processors in a distributed system may vary in size and
function

08/25/20 14
Multiple independent CPUs or processors in a computer system.
Core Activities:

 Distributes computation logics among several physical processors

 Processors do not share memory or a clock.

 each processor has its own local memory.

 OS manages the communications between the processors.

08/25/20 15
 Advantages:
 With resource sharing facility user at one site may be able to use the resources available at
another
 Speedup the exchange of data with one another via electronic mail
 If one site fails in a distributed system, the remaining sites can potentially continue
operating.
 Better service to the customers
 Reduction of the load on the host computer
 Reduction of delays in data processing

08/25/20 16
 Time sharing is a technique which enables many people, located at various
terminals, to use a particular computer system at the same time

 Processor's time is shared among multiple users

 minimize response time.

 Multiple jobs are executed by the CPU by switching between them

 Job Switching occurs frequently

08/25/20 17
Runs on a server

OS provides server the capability to manage data, users, groups etc.

Allow shared file and printer access among multiple computers 


 local area network (LAN)

Example:
 MS Windows 2003 and 2008

  UNIX, Linux, Mac OS X

08/25/20 18
Advantages:
Provide advantage of quick response
Avoids duplication of software
Reduces CPU idle time
Disadvantages:
Problem of reliability.
Question of security of user programs and data.
Problem of data communication.

08/25/20 19
 Real time systems are usually dedicated embedded systems.

 Real time activities of OS:

 Operating Systems typically read from and react to sensor data.

 The Operating system must guarantee response to events within fixed

periods of time to ensure correct performance.

08/25/20 20
08/25/20 21
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.
 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.
08/25/20 22
 People like connecting devices
 A computer is much more than the CPU
 Keyboard, mouse, screen, disk drives
 Scanner, printer, sound card, camera, etc.
 These devices occasionally need CPU service
 But we can’t predict when
 External events typically occur on a macroscopic timescale
 we want to keep the CPU busy between events FNeed a way for
CPU to find out devices need attention

08/25/20 23
 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.

 Incoming interrupts are disabled while another interrupt is being processed to prevent
a lost interrupt.

 A trap is a software-generated interrupt caused either by an error or a user request.

 An operating system is interrupt driven.

08/25/20 24
 The operating system preserves the state of the CPU by
storing registers and the program counter.
 Determines which type of interrupt has occurred:
 polling
 vectored interrupt system

 Separate segments of code determine what action should be


taken for each type of interrupt

08/25/20 25
Polling interrupts:
 CPU periodically checks each device to see if it needs service
 takes CPU time even when no requests pending
 Overhead may be reduced at expense of response time ¸ can be
efficient if events arrive rapidly

 Polling is like picking up your phone every few seconds to see if


you have a call. …
08/25/20 26
Vectored interrupts:

 Give each device a wire (interrupt line) that it can use to signal

the processor
 When interrupt signaled, processor executes a routine called an

interrupt handler to deal with the interrupt


 No overhead when no requests pending

08/25/20 27
 Interrupt Time Line For a Single Process Doing Output

08/25/20 28
 After I/O starts, control returns to user program only upon I/O completion.
 Wait instruction idles the CPU until the next interrupt
 Wait loop (contention for memory access).
 At most one I/O request is outstanding at a time, no simultaneous I/O processing.
 After I/O starts, control returns to user program without
waiting for I/O completion.
 System call – request to the operating system to allow user to wait for
I/O completion.
 Device- status table contains entry for each I/O device indicating its type,
address, and state.
 Operating system indexes into I/O device table to determine device status and to
modify table entry to include interrupt.

08/25/20 29
synchronous asynchronous

08/25/20 30
08/25/20 31
 Used for high-speed I/O devices able to transmit information
at close to memory speeds.
 Device controller transfers blocks of data from buffer storage
directly to main memory without CPU intervention.
 Only on interrupt is generated per block, rather than the one
interrupt per byte.

08/25/20 32
 Main memory – only large storage media that the CPU can access directly.

 Secondary storage – extension of main memory that provides large


nonvolatile storage capacity.

 Magnetic disks – rigid metal or glass platters covered with magnetic


recording material

Disk surface is logically divided into tracks, which are subdivided into
sectors.
The disk controller determines the logical interaction between the
device and the computer. 08/25/20 33
08/25/20 34
Storage systems organized in hierarchy.
Speed
Cost
Volatility

 Caching – copying information into faster storage


system;
main memory can be viewed as a last cache for secondary
storage.

08/25/20 35
 Interrupts :
 Interrupts are very useful to handle multiple processes.
 Basically interrupts is the foundation for multiprocessing.
 Interrupt transfers control to the interrupt service routine generally, through the
interrupt vector, which contains the addresses of all the service routines.
 DMA:
 Used for high-speed I/O devices able to transmit information at close to memory speeds
 Main memory
 – only large storage media that the CPU can access directly.
 Secondary storage
 – extension of main memory that provides large nonvolatile storage capacity.
 Magnetic disks
 – rigid metal or glass platters covered with magnetic recording material

08/25/20 36
In this lecture, we reviewed the operating system
environments
We discussed operating system structure , storage structure,
storage hierarchy , interrupts and I/O structure with
explanation and diagrams

08/25/20 37

You might also like