Lecture 29
Lecture 29
ARCHITECTURE (COA)
EET- 2211
EET 2211
4TH SEMESTER – CSE & CSIT
CHAPTER 8, LECTURE 29
CHAPTER 8 – OPERATING SYSTEM
SUPPORT
TOPICS TO BE COVERED
Ø Operating System Overview
Ø Scheduling
Ø Memory Management
LEARNING OBJECTIVES
Ø Summarize the key functions of the OS.
Ø Discuss the evolution of the OS form early simple batch systems to modern complex
systems.
Ø Explain the different types of scheduling .
Ø Understand the reason for memory partitioning and explain the various techniques
that are used.
Ø Assess the relative advantages of paging and segmentation.
Ø Define Virtual memory.
2 LECTURE 29 7/10/2021
OPERATING SYSTEM OVERVIEW
An OS is a program that controls the execution of application
programs and acts as an interface between applications and the
computer hardware.
Popular OS include LINUX OS, WINDOWS OS, VMS, OS/400,
Z/OS etc.
OBJECTIVES:(i)Convenience (an OS makes a computer
more convenient to use)
(ii) Efficiency (an OS allows the computer
system resources to be used in an efficient
manner)
ASPECTS OF OS: (i) the OS as a user/computer interface
(ii) the OS as a resource manager.
3 LECTURE 29 7/10/2021
THE OS AS A USER/COMPUTER
INTERFACE
üThe end user is not concerned
with the computer’s architecture.
üThe application is expressed in a
programming language.
üP r o g r a m s a r e r e f e r r e d a s
UTILITES.
üThe most impor tant system
program is the OS.
üOS masks the details of the
hardware from the programmer.
üOS provides the programmer a
convenient interface for using the
Fig.1: Computer Hardware and Software
system. Structure [Source: Computer Organization
LECTURE 29
and Architecture by William Stallings]
4 7/10/2021
Contd.
vThe OS provides SERVICES in the following fields:
1. Program creation
2. Program execution
3. Access to I/O devices
4. Controlled access to files
5. System access
6. Error detection and response
7. Accounting
5 LECTURE 29 7/10/2021
Contd.
Ø PROGRAM CREATION : The OS provides a variety of facilities
and services such as editors and debuggers to assist the programmer
in creating programs. These programs in the form of utility
programs that are not actually part of the OS but are accessible
through the OS.
6 LECTURE 29 7/10/2021
Ø CONTROLLED ACCESS TO FILES : OS takes care about the details of the
control that includes the nature of I/O devices (disk drive, tape drive) and also the
file format on the storage medium. With multiple simultaneous users the OS can
provide protection mechanisms to control access to the files.
7 LECTURE 29 7/10/2021
Contd.
v Interfaces in a typical
computer system
1. I n s t r u c t i o n s e t
architecture (ISA)
2. A p p l i c a t i o n b i n a r y
interface (ABI)
3. A p p l i c a t i o n
programming interface
(API)
8 LECTURE 29 7/10/2021
THE OS AS A RESOURCE MANAGER
üOS is responsible for managing the
resources for the movement, storage and
processing of data.
üOS provides instr uctions for the
processor.
üOS directs the processor in the use of
other system resources.
üA portion of the OS is in the main
memory which includes
KERNEL/NUCLEUS.
üThe rest of the main memory contains
the user programs and data.
üOS decides when an I/O device can be
Fig.2: OS as Resource Manager [Source:
used by a program in execution. Computer Organization and Architecture by
William Stallings]
9 LECTURE 29 7/10/2021
TYPES OF OS
v TYPES OF OS
1. Interactive and batch systems
2. Mulitprogramming and uniprogramming systems
10 LECTURE 29 7/10/2021
Contd.
v EARLY SYSTEMS
ü No OS.
ü The programmer interacted directly with the system.
ü Processors were run from a console (consisting of display light,
toggle switches, input devices and printer).
ü Programs in the processor code were loaded through the input
devices.
ü Error condition was indicated through lights.
ü The programmer checks the registers and main memory to
determine the cause of error.
ü Normal completion of the program appeared on the printer.
11 LECTURE 29 7/10/2021
Contd.
ü The Early systems presented two main problems:
1. Scheduling
2. Setup time
12 LECTURE 29 7/10/2021
Contd.
v SIMPLE BATCH SYSTEMS
ü Early processors were expensive and hence we need to
maximize the processor utilization. So
ü Simple batch systems were developed to improve processor
utilization.
ü Also known as MONITOR.
ü The user has no direct access to the processor.
ü The user submits the job on cards or tape to a computer
operator, who batches the jobs together sequentially and places
the entire batch on an input device for use by the monitor.
13 LECTURE 29 7/10/2021
Contd.
RESIDENT MONITOR
ü The portion of monitor always present in the
main memory and available for execution is
known as resident monitor.
ü The monitor reads in jobs one at a time from
the input device.
ü Now the current job is placed in the user
program area and the control is passed to this.
ü After completion of the job the control is
returned to the monitor which reads the next Fig.3: Memory Layout
job. for a Resident Monitor
[Source: Co m p u t e r
ü The result of each job are printed out for Organization and
delivery to the user. Architecture by
William Stallings]
14 LECTURE 29 7/10/2021
Contd.
15 LECTURE 29 7/10/2021
Contd.
16 LECTURE 29 7/10/2021
Contd.
18 LECTURE 29 7/10/2021
Contd.
19 LECTURE 29 7/10/2021
Contd.
v TIME-SHARING SYSTEMS
ü Processor’s time is shared among multiple users.
ü Multiple users can simultaneously access the system through
terminals.
ü E.g. if there are n users actively requesting service at one
time, each user will see on the average 1/n of the effective
computer speed.
LONG-TERM SCHEDULING
ü Scheduler determines the programs that are to be
admitted to the system for processing.
ü It controls the degree of multiprogramming.
22 LECTURE 29 7/10/2021
Contd.
MEDIUM-TERM SCHEDULING
ü It is a part of the swapping function.
ü Swapping-in decision is based on the need to manage the
degree of multiprogramming.
SHORT-TERM SCHEDULING
ü Also known as dispatcher, executes frequently makes the
fine-grained decision of which job to be executed next.
23 LECTURE 29 7/10/2021
Contd.
PROCESS STATES
ü During the life-time of a process its status changes a number
of times.
ü Its status at any point of time is known as a state.
LECTURE 29
Fig.9: Scheduling Example [Source: Computer Organization and
26 7/10/2021
Architecture by William Stallings]
QUESTIONS
1. What is an operating system?
2. List and briefly define the key services provided by an OS.
3. List and briefly define the major types of OS scheduling.
27 LECTURE 29 7/10/2021