topic1-intro os
TRANSCRIPT
-
8/7/2019 TOPIC1-INTRO os
1/32
BITS 1213 - Operating Systems 1
Introduction:
Operating System Overview
Topic 1
-
8/7/2019 TOPIC1-INTRO os
2/32
BITS 1213 - Operating Systems 2
Consists of the
most used andmost fundamental
components of the
OS
-
8/7/2019 TOPIC1-INTRO os
3/32
BITS 1213 - Operating Systems 3
Operating Systems (OS) O/S controls the execution of application
programs and acts as an interface between
applications and the computer hardware O/S objectives:
to make a computer more convenience to use
to efficiently use the computer system resources
to permit the effective development, testing and
introduction of new system functions without
interfering with service
-
8/7/2019 TOPIC1-INTRO os
4/32
BITS 1213 - Operating Systems 4
The O/S provides services in the following
areas:
1. Facilities for Program creation editors,compilers, linkers, and debuggers
2. Program execution loading in memory, I/Oand file initialization
3. Access to I/O and files deals with the specificsof I/O and file formats
4. System access Protection in access toresources and data Resolves conflicts for resource
contention
OS Services
-
8/7/2019 TOPIC1-INTRO os
5/32
BITS 1213 - Operating Systems 5
OS Services
5. Error detection and response
eg. Memory failure, ending a program and report error .6. Accounting
eg. used for billing users (on multiuser systems)
eg. collect statistics on resource usage
-
8/7/2019 TOPIC1-INTRO os
6/32
BITS 1213 - Operating Systems 6
Evolution of OS Must adapt to hardware upgrades and newtypes of hardware.
Examples: Character vs graphic terminalsIntroduction of paging hardware
Must offer new services, eg: internetsupport
The need to change the OS on regular basisplace requirements on its design modularconstruction with clean interfaces object oriented
methodology
-
8/7/2019 TOPIC1-INTRO os
7/32
BITS 1213 - Operating Systems 7
The Evolution of O/S
Serial Processing
Simple Batch Systems
Multiprogrammed
Batch Systems
Time-Sharing Systems
-
8/7/2019 TOPIC1-INTRO os
8/32
BITS 1213 - Operating Systems 8
Serial Processing No operating system
The programmer interacted directly with the
computer hardware Machine run from a console, consisting of display
lights, toggle switches, input device and a printer
These systems presented two main problems:
scheduling result in wasted computer idle time orinsufficient allotted time
requires a considerable amount of setup time
-
8/7/2019 TOPIC1-INTRO os
9/32
BITS 1213 - Operating Systems 9
Simple Batch Systems
The concept of batch operating system was introduced
to improve utilization
The idea was to use a software known as the monitor
the user no longer has direct access to the machine
The user submit a job (written on card or tape) to a
computer operator.
The computer operator place a batch of several jobs on ainput device.
Monitor manages the execution of each program in the
batch.
-
8/7/2019 TOPIC1-INTRO os
10/32
BITS 1213 - Operating Systems 10
Simple Batch Systems
Monitor reads jobs one at a timefrom the input device.
Monitor places a job in the user
program area. Each program is constructed to
branch back to the monitor when itcompletes processing
the monitor would automaticallybegin loading the next program
-
8/7/2019 TOPIC1-INTRO os
11/32
BITS 1213 - Operating Systems 11
Machine time alternates between execution of user
programs and execution of the monitor
Two sacrifices:
some main memory is now given over to the
monitor
some machine time is consumed by the monitor both of these are forms of overhead
Simple Batch Systems
-
8/7/2019 TOPIC1-INTRO os
12/32
BITS 1213 - Operating Systems 12
Uniprogramming The processor is often idle.
I/O devices is slow compared to the processor
the processor spends a certain amount of time executinguntil it reaches an I/O instruction
it must wait until that I/O instruction concludes before
proceeding
-
8/7/2019 TOPIC1-INTRO os
13/32
BITS 1213 - Operating Systems 13
Expand memory to hold two, three or more
programs
when one job needs to wait for I/O, the processor canswitch to the other job no waiting for I/O
known as multiprogramming or multitasking
Multiprogramming uses hardware that supports
I/O interrupts and DMA (direct access memory)
Memory management is needed requires
scheduling algorithm
Multiprogrammed Batch Systems
-
8/7/2019 TOPIC1-INTRO os
14/32
BITS 1213 - Operating Systems 14
Multiprogramming
-
8/7/2019 TOPIC1-INTRO os
15/32
BITS 1213 - Operating Systems 15
Multiprogramming
-
8/7/2019 TOPIC1-INTRO os
16/32
BITS 1213 - Operating Systems 16
Time-Sharing Systems To provide a mode for interactive jobs
Multiprogramming can be used to handle multiple
interactive jobs the technique is known as time sharing
the processors time is shared among multiple users
Multiple users simultaneously access the system
through terminals the operating system interleaving the execution of each
user program in a short burst or quantum ofcomputation
-
8/7/2019 TOPIC1-INTRO os
17/32
BITS 1213 - Operating Systems 17
Assume that there are four interactive users with
the following memory requirement:
JOB1: 15,000
JOB2: 20,000
JOB3: 5,000
JOB4: 10,000
Time-Sharing Systems
(Example)
-
8/7/2019 TOPIC1-INTRO os
18/32
BITS 1213 - Operating Systems 18
Time-Sharing Systems
(Example)
-
8/7/2019 TOPIC1-INTRO os
19/32
BITS 1213 - Operating Systems 19
Major Achievements Five major theoretical advances in the
development of operating systems:
processes
memory management
information protection and security
scheduling and resource management
system structure
-
8/7/2019 TOPIC1-INTRO os
20/32
BITS 1213 - Operating Systems 20
(1) Processes A program in execution
An instance of a program running on a computer
The entity that can be assigned to and executed on
a processor
A unit of activity characterized by a single
sequential thread of execution, a current state, andan associated set of system resources
-
8/7/2019 TOPIC1-INTRO os
21/32
BITS 1213 - Operating Systems 21
Process Consists of three components
An executable program
Associated data needed by the program
Execution context of the program
All information the operating system needs to manage the
process
-
8/7/2019 TOPIC1-INTRO os
22/32
BITS 1213 - Operating Systems 22
(2) Memory Management Process isolation
Automatic allocation and management
Support for modular programming
Protection and access control
Long-term storage
-
8/7/2019 TOPIC1-INTRO os
23/32
BITS 1213 - Operating Systems 23
(3) Information Protection and
Security Availability
Protecting system against interruption
ConfidentialityUsers cannot read data for which data is unauthorized
Data integrity
Protection data from unauthorized modification
Authenticity
proper verification of the identity of users and validity ofmessages or data
-
8/7/2019 TOPIC1-INTRO os
24/32
BITS 1213 - Operating Systems 24
(4) Scheduling and Resource
Management Fairness
give equal and fair access to all processes
Differential responsiveness discriminate between different classes of jobs
Efficiency
maximize throughput, minimize response time, and
accommodate as many uses as possible
-
8/7/2019 TOPIC1-INTRO os
25/32
BITS 1213 - Operating Systems 25
Major Elements of Operating
System
-
8/7/2019 TOPIC1-INTRO os
26/32
BITS 1213 - Operating Systems 26
(5) System Structure View the system as a series of levels
Each level performs a related subset of functions
Each level relies on the next lower level to
perform more primitive functions
This decomposes a problem into a number of more
manageable sub problems
-
8/7/2019 TOPIC1-INTRO os
27/32
BITS 1213 - Operating Systems 27
Operating System Design
HierarchyLevel Name Objects Example Operations
13 Shell User programming Statements in shell language
environment
12 User processes User processes Quit, kill, suspend, resume
11 Directories Directories Create, destroy, attach, detach,
search, list
10 Devices External devices, such Open, close,
as printer, displays read, write
and keyboards
9 File system Files Create, destroy, open, close
read, write
8 Communications Pipes Create, destroy, open. close,
read, write
-
8/7/2019 TOPIC1-INTRO os
28/32
BITS 1213 - Operating Systems 28
Operating System Design
HierarchyLevel Name Objects Example Operations
7 Virtual Memory Segments, pages Read, write, fetch
6 Local secondary Blocks of data, device Read, write, allocate, free
store channels
5 Primitive processes Primitive process, Suspend, resume, wait, signal
semaphores, ready
list
-
8/7/2019 TOPIC1-INTRO os
29/32
BITS 1213 - Operating Systems 29
Operating System Design
HierarchyLevel Name Objects Example Operations
4 Interrupts Interrupt-handling Invoke, mask, unmask,
programs retry
3 Procedures Procedures, call stack, Mark stack, call, return
display
2 Instruction Set Evaluation stack, micro- Load, store, add, subtract
program interpreter, branch
scalar and array data
1 Electronic circuits Registers, gates, buses, Clear, transfer, activate,
etc. complement
Level 1-4 represents hardware
-
8/7/2019 TOPIC1-INTRO os
30/32
BITS 1213 - Operating Systems 30
Characteristics of Modern
Operating Systems Microkernel architecture
Small operating system core
Contains only essential operating systems functions
Many services traditionally included in the operating system are nowexternal subsystems
device drivers
file systems
virtual memory manager
windowing system security services
Multithreading
process is divided into threads that can run simultaneously
-
8/7/2019 TOPIC1-INTRO os
31/32
BITS 1213 - Operating Systems 31
Thread
dispatchable unit of work
executes sequentially and is interruptable Process is a collection of one or more threads
Symmetric multiprocessing
there are multiple processors
these processors share same main memory andI/O facilities
All processors can perform the same functions
Characteristics of Modern
Operating Systems
-
8/7/2019 TOPIC1-INTRO os
32/32
BITS 1213 - Operating Systems 32
Characteristics of Modern
Operating Systems Distributed operating systems
provides the illusion of a single main memory and
single secondary memory space used for distributed file system
Object-oriented design
used for adding modular extensions to a small kernel
enables programmers to customize an operating systemwithout disrupting system integrity