Escolar Documentos
Profissional Documentos
Cultura Documentos
OVERVIEW
1
CHAPTER 2
Objectives
2
(OS).
Discuss the evolution of OS from early simple batch
system to modern complex system
Explain each of the major achievements in OS
Discuss the key design areas in the development of
modern OS
Topics
3
programs
An interface between applications and hardware
Objectives of an OS
5
1. Convenience
2. Efficiency
3. Ability to Evolve
Utilities:
Program development
Program execution
Number of tasks need to be performed in executing a program
OS handle the scheduling duties for the user
System access
OS provide response that clear the error condition with least impact
to running applications
Ending program that cause error
Retrying the operation
Reporting error to application
Accounting
collect statistics
monitor performance
used to anticipate future enhancements
used for billing users
13
Serial Processing
Simple Batch
System
Multiprogramming
Batch System
Time Sharing
System
Serial Processing
16
No operating system
User interact directly with computer hardware.
Machines run from a console with display lights and
Serial Processing
17
How it works?
Programs in machine code were loaded via the input device
(e.g.. Card Reader)
If there is an error (indicated by the lights) halt the
program.
Then the programmer will proceed to examine processor
registers and main memory to determine the cause of error.
If the program proceeds to normal completion, the output will
be printed.
Serial Processing
18
Two Problems
Scheduling
Setup time
Serial Processing
19
Scheduling
How user use the machine
User reserves machine time
Problem arise when user sign up more than the time needed or
cant complete their job within the time reserve.
Reserved for 1 hour, but completed job for 20 minutes 40
minutes is a processor idle time
Reserved for 1 hour, but job did not complete because of error
occurs need to reserve another time
Serial Processing
20
Setup time
Many steps involve in running a single program/job
load the compiler + source program to memory
saving the compiled program
load and link the object program and common functions
each of these steps involving mounting or dismounting tapes
Serial Processing
21
Monitors:
Software that controls the running programs
Batch jobs together
Program branches back to monitor when finished
A part of the monitor call Resident monitor is in main
memory and available for execution
24
This will cause the CPU to fetch its next instruction from monitor.
FORTRAN Program
$LOAD
$RUN
DATA
$END
With JCL:
Each read instruction (in user
program) causes one line of
input to be read
Causes input routine (OS) to be
invoke
Checks for not reading JCL line
Skip to the next JCL line at
completion of user program
With JCL:
Each read instruction (in user program) causes one line of
input to be read
Causes input routine (OS) to be invoked
Checks for not reading JCL line
Skip to the next JCL line at completion of user program
Memory protection
Do not allow the memory area containing the monitor to be altered by
users programs.
If it happens, processor should detect an error and transfer control to
the monitor.
Monitor will abort the job, print out error message and load the next
job.
Timer
Prevents a job from monopolizing the system.
Timer is set at the beginning of each job.
An interrupt occurs when time is expired.
Privileged instruction
Can be executed only by the monitor
An interrupt occurs if a program tries these instructions.
E.g. I/O instructions.
Interrupts
Provides flexibility for relinquishing control to and regaining
control from user programs
technique
Uniprogramming:
Processor execute a job, when job need for I/O, processor must
wait for I/O instruction to complete before proceed execute the
same job
Multiprogramming:
Processor execute a job, When job needs to wait for I/O, the
processor can switch to the other job
33
34
Example:
JOB1
Type of job
Duration
Memory required
Need disk?
Need terminal?
Need printer?
Heavy compute
5 min.
50K
No
No
No
35
JOB2
JOB3
Heavy I/O
15 min.
100 K
No
Yes
No
Heavy I/O
10 min.
80 K
Yes
No
Yes
Effects of multiprogramming:
Uniprogramming
Processor use
Memory use
Disk use
Printer use
Elapsed time
Throughput rate
Mean response time
22%
30%
33%
33%
30 min.
6 jobs/hr
18 min.
36
Multiprogramming
43%
67%
67%
67%
15 min.
12 jobs/hr
10 min.
Time Sharing
37
Transaction processing
38
multiprogramming.
The differences between batch OS and time sharing
is shown below:
Batch
Multiprogramming
Time Sharing
Principal objective
Source of directives to
operating system
Major Achievements
40
developed.
Five major theoretical advances in the development
of OS:
Process
Memory Management
Information protection and security
Scheduling and resource management
System structure
Process
41
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, and an associated set of system
resources
Process
42
Time sharing
Real-time transaction
Process
43
more than one user or program attempts to make use of a shared resource at
the same time
only one routine at time allowed to perform an update against the file
Deadlocks
it is possible for two or more programs to be hung up waiting for each other
may depend on the chance timing of resource allocation and release
Process
44
A component of a process:
An executable program
Associated data needed by the program
Execution context of the program
it is the internal data by which the OS is able to supervise and
control the process
includes the contents of the various process registers
includes information such as the priority of the process and
whether the process is waiting for the completion of a particular
I/O event
45
Memory Management
46
system facilities.
Availability
Confidentiality
Assures that user cannot read data for which access is unauthorized
Data Integrity
Authenticity
Fairness
Differential responsiveness
Efficiency
System Structure
49
50
51
New Applications
multiprocessor systems
high-speed networks
faster processors and larger memory
multimedia applications
Internet and Web access
Client/Server applications
Viruses, worms
Hacking techniques
Microkernel architecture
Multithreading
Symmetric multiprocessing
Distributed OS
Object-oriented design.
Microkernel Architecture
54
Multithreading
55
simultaneously
Useful when the application consists of several tasks that do
not need to be serialized
E.g. database server that listens for and processes numerous client
requests
application-related events
All threads within the same process share the same data and
resources and a part of the processs execution context
It is easier to create or destroy a thread or switch among
threads (of the same process) than to do these with processes.
Symmetric Multiprocessing
56
Symmetric Multiprocessing
57
Distributed OS
58
kernel
At the OS levels an object-based structure enables
programmers to customize an operating system
without disrupting system integrity
Eases the development of distributed tools and fullblown of distributed OS.