Download Course: Operating Systems Instructor: M Umair

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Burroughs MCP wikipedia , lookup

Mobile operating system wikipedia , lookup

RSTS/E wikipedia , lookup

Unix security wikipedia , lookup

Spring (operating system) wikipedia , lookup

Copland (operating system) wikipedia , lookup

Process management (computing) wikipedia , lookup

Security-focused operating system wikipedia , lookup

VS/9 wikipedia , lookup

Distributed operating system wikipedia , lookup

CP/M wikipedia , lookup

Transcript
Course: Operating Systems
Instructor: M Umair
1
M Umair – http://www.m-umair.com
Introduction
2
M Umair – http://www.m-umair.com
About the course
Instructor’s Introduction
Course outline – Reference Books
What to expect
 Lectures – Supporting Material
 Quizzes & Assignments
 Course Website
 Questions ?
3
M Umair – http://www.m-umair.com
Prelude
An operating system acts as an intermediary between the user
of a computer and the computer hardware.
An operating system is software that manages the computer
hardware.
The operating system is the one program running at all times on
the computer—usually called the kernel.
Can you name some of the popular operating systems ?
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
4
Prelude
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
5
Prelude
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
6
Simple Batch Systems
Hire an operator
Add a card reader
Reduce setup time by batching similar jobs
Automatic job sequencing – automatically transfers control from
one job to another. First rudimentary operating system.
Resident monitor
Initial control in monitor
Control transfers to job
When job completes control transfers back to monitor
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
7
Simple Batch Systems
Operating
System
User Program
Disk
Card
Reader
CPU
Line
Printer
Spooling
Memory Layout
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
8
Multi Programmed Batch Systems
Operating
System
 Jobs stored in Job pool ready to be
brought into memory
 Job Scheduling
Job 1
Job 2
 Having many programs in memory
Memory Management
Job 3
 Several jobs ready for execution
CPU Scheduling
Job 4
 Many other considerations as well
Memory Layout
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
9
Time Sharing Systems
The CPU is multiplexed among several jobs that are kept in
memory and on disk (the CPU is allocated to a job only if the job is
in memory).
A job is swapped in and out of memory to the disk.
 A time sharing OS allows many users to share the computer
simultaneously.
 Switching is done rapidly.
 List the complexities of time sharing system ?
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
10
Parallel Systems
Multiprocessor systems with more than one CPU in close
communication.
Tightly coupled system – processors share memory and a clock;
communication usually takes place through the shared memory.
Advantages of parallel system:
Increased throughput
Economical
Increased reliability
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
11
Parallel Systems
Symmetric multiprocessing (SMP)
Each processor runs an identical copy of the operating system.
Most modern operating systems support SMP
Asymmetric multiprocessing
Each processor is assigned a specific task; master processor
schedules and allocates work to slave processors.
More common in extremely large systems
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
12
Real Time Systems
Often used as a control device in a dedicated application such
as controlling scientific experiments, medical imaging systems,
industrial control systems, and some display systems.
Well-defined fixed-time constraints.
Hard real-time system
Soft real-time system
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
13
Real Time Systems
Hard real-time system.
Secondary storage limited or absent, data stored in short-term
memory, or read-only memory (ROM)
Conflicts with time-sharing systems, not supported by generalpurpose operating systems.
Soft real-time system
Limited utility in industrial control or robotics
Useful in applications (multimedia, virtual reality) requiring
advanced operating-system features.
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
14
Distributed Systems
Distribute the computation among several physical processors.
Loosely coupled system – each processor has its own local
memory; processors communicate with one another through
various communications lines, such as high-speed buses or
telephone lines.
Advantages of distributed systems.
Resources Sharing
Computation speed up – load sharing
Reliability
Communications
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
15
Distributed Systems
Network Operating System
Provides file sharing
Provides communication scheme
Runs independently from other computers on the network
Distributed Operating System
Less autonomy between computers
Gives the impression there is a single operating system
controlling the network.
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
16
Interrupts
Modern operating systems are interrupt driven.
Events are signaled by the occurrence of an interrupt or a trap.
 A trap (or an exception) is a software-generated interrupt.
IVT (interrupt vector table)
Any example of trap?
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
17
DMA
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 one interrupt is generated per block, rather than the one
interrupt per byte.
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
18
Dual-Mode Operation
How to distinguish between the execution of operating-system
code and user defined code?
Two separate modes of operation: user mode and kernel mode
(also called supervisor mode, system mode, or monitor mode).
A bit, called the mode bit, is added to the hardware of the
computer to indicate the current mode:
kernel (0) AND user (1).
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
19
Dual-Mode Operation
The machine instructions that may cause harm are known as
privileged instructions.
All I/O instructions are privileged instructions.
The hardware allows privileged instructions to be executed only
in kernel mode.
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
20
Dual-Mode Operation - Example
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
21
Dual-Mode Operation - Example
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
22
Dual-Mode Operation - Example
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
23
Dual-Mode Operation - Case
The lack of a hardware-supported dual mode can cause serious
shortcomings in an operating system.
For instance, MS-DOS was written for the Intel 8088
architecture, which has no mode bit and therefore no dual mode.
A user program can wipe out the operating system by writing
over it with data.
Multiple programs are able to write to a device at the same
time, with potentially disastrous results.
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
24
Weekly Tasks
Describe the differences between symmetric and asymmetric
multiprocessing. What are three advantages and one disadvantage
of multiprocessor systems?
What is the purpose of interrupts? What are the differences
between a trap and an interrupt? Can traps be generated
intentionally by a user program? If so, for what purpose?
Read about Memory & CPU protection?
{ Ref: Operating System Concepts 8th Edition | Abraham Silberschatz , Greg Gagne , Peter B. Galvin }
M Umair – http://www.m-umair.com
25