Download HistoryAndHardware

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

Mobile operating system wikipedia , lookup

Burroughs MCP wikipedia , lookup

Spring (operating system) wikipedia , lookup

RSTS/E wikipedia , lookup

Unix security wikipedia , lookup

Copland (operating system) wikipedia , lookup

OS 2200 wikipedia , lookup

Process management (computing) wikipedia , lookup

Security-focused operating system wikipedia , lookup

Distributed operating system wikipedia , lookup

CP/M wikipedia , lookup

VS/9 wikipedia , lookup

Transcript
Bare Machine (early 1950s)
 Structure
 Large machines run from console
 Single user system
 Programmer/User as operator
 Paper tape or punched cards

Early Software
 Assemblers, compilers, linkers, loaders
 Libraries of common subroutines
 Device drivers
 Inefficient use of expensive resources
 Low CPU utilization
 Significant amount of setup time

Solutions
 Add a card reader
 Hire an operator
Operating System Concepts
2.1
Silberschatz, Galvin and Gagne 2002
Simple Batch Systems
 Reduce setup time by batching similar jobs
 Automatic job sequencing - automatically transfers control
from one job to another - first rudimentary OS
 Resident monitor
 Initial control in monitor
 Control transfers to job
 Job transfers control back to monitor (or chaos ensues)
 Use control cards to
 Separate jobs
 Specify job types, e.g., FORTRAN
 Separate code from data
Operating System Concepts
2.2
Silberschatz, Galvin and Gagne 2002
Memory Layout for a Simple Batch System
Operating System Concepts
2.3
Silberschatz, Galvin and Gagne 2002
Offline Operation
 Do card reading and printing offline
 Jobs copied from cards to tape
 Tape loads to CPU, and results output to tape
 Tape content printed
 Advantages
 CPU constrained only by tape speed
 No changes to existing code
 Multiple card readers and printers per CPU
Operating System Concepts
2.4
Silberschatz, Galvin and Gagne 2002
Offline Operation Layout
Operating System Concepts
2.5
Silberschatz, Galvin and Gagne 2002
Spooling
 Overlap I/O of one job with computation of another job.
While executing one job, the OS:
 Reads next job from card reader into a storage area on the
disk (job queue).
 Outputs printout of previous job from disk to printer.
 Job pool – data structure that allows the OS to select
which job to run next in order to increase CPU utilization
 Critical change of hardware
 Allows CPU to swap between IO control and job
 Implemented with interrupts
Operating System Concepts
2.6
Silberschatz, Galvin and Gagne 2002
Spooling
Operating System Concepts
2.7
Silberschatz, Galvin and Gagne 2002
Two I/O Methods
Synchronous
Operating System Concepts
Asynchronous
2.8
Silberschatz, Galvin and Gagne 2002
Synchronous IO
 After I/O starts, control returns to user program only upon
I/O completion.
 Wait instruction idles the CPU until the next interrupt
 At most one I/O request is outstanding at a time, no
simultaneous I/O processing.
 More common in real time systems
Asynchronous IO
 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
 IO device interrupts on completion
 I/O devices and the CPU can execute concurrently.
Operating System Concepts
2.9
Silberschatz, Galvin and Gagne 2002
Asynchronous IO Request
 User process requests IO service
 Device-status table contains entry for each I/O device
indicating its type, address, and state
 If device is idle the IO starts
 If the device is busy, the request is queued (double
buffering)
Operating System Concepts
2.10
Silberschatz, Galvin and Gagne 2002
Asynchronous IO
 Each device controller has a local buffer.
 CPU moves data from/to memory to/from local buffers
 Device controller informs CPU that it has finished its
operation by causing an interrupt.
 On interrupt the OS indexes into I/O device table to
determine device status and do service
 Feed more data from this request
 Start next request on queue
 Note device idle
Operating System Concepts
2.11
Silberschatz, Galvin and Gagne 2002
Multiprogrammed Batch Systems
 Several jobs are kept in main memory at the same time,
and the CPU is multiplexed among them.
Operating System Concepts
2.12
Silberschatz, Galvin and Gagne 2002
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.
Operating System Concepts
2.13
Silberschatz, Galvin and Gagne 2002
Time-Sharing Interactive Computing
 Multi-programming plus …
 Multi-user
 On-line communication between the user and the system is
provided; when the operating system finishes the execution
of one command, it seeks the next “control statement” from
the user’s keyboard.
 On-line file system must be available for users to access
data and code
 Jobs may be swapped in and out of memory to the disk.
Operating System Concepts
2.14
Silberschatz, Galvin and Gagne 2002
Dual-Mode Operation
 Provide hardware support to differentiate between at least two
modes of operations.
1. User mode – execution done on behalf of a user.
2. Monitor mode (also kernel mode or system mode) – execution done
on behalf of operating system.
 Mode bit added to computer hardware to indicate the current
mode: monitor (0) or user (1).
 When an interrupt or fault occurs hardware switches to monitor
mode
 When executing in monitor mode, the operating system has
unrestricted access to both monitor and user’s memory.
 Privileged instructions can be issued only in monitor mode.
Interrupt/fault
monitor
user
set user mode
Operating System Concepts
2.15
Silberschatz, Galvin and Gagne 2002
CPU Protection
 Timer – interrupts computer after specified period to
ensure operating system maintains control.
 Timer is decremented every clock tick.
 When timer reaches the value 0, an interrupt occurs.
 Timer commonly used to implement time sharing.
 Timer also used to compute the current time.
 Load-timer is a privileged instruction.
 Setting the interrupt vector is privileged
Operating System Concepts
2.16
Silberschatz, Galvin and Gagne 2002
Memory Protection
 In order to have memory protection, add two registers
that determine the range of legal addresses a program
may access:
 Base register – holds the smallest legal physical memory
address.
 Limit register – contains the size of the range
 Memory outside the defined range is protected.
 The load instructions for the base and limit registers are
privileged instructions.
Operating System Concepts
2.17
Silberschatz, Galvin and Gagne 2002
Use of A Base and Limit Register
Operating System Concepts
2.18
Silberschatz, Galvin and Gagne 2002
I/O Protection
 All I/O instructions are privileged instructions.
Operating System Concepts
2.19
Silberschatz, Galvin and Gagne 2002
Personal Computers
 Computer system dedicated to a single user.
 I/O devices – keyboards, mice, display screens, small




printers.
Goals: User convenience and responsiveness.
Can adopt technology developed for larger operating
systems
Individuals have sole use of computer - only multiprogramming.
May run several different types of operating systems
(Windows, MacOS, UNIX, Linux)
Operating System Concepts
2.20
Silberschatz, Galvin and Gagne 2002
Multiprocessor 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.
Operating System Concepts
2.21
Silberschatz, Galvin and Gagne 2002
Multiprocessor Systems
 Symmetric multiprocessing (SMP)
 Each CPU runs an identical copy of the operating system.
 Many processes can run at once without performance deterioration.
 Most modern operating systems support SMP
 Asymmetric multiprocessing
 Each processor is assigned a specific task; master processor
schedules and allocated work to slave processors.
 More common in extremely large systems
 Advantages of multiprocessor systems:
 Increased throughput
 Economical
 Increased reliability
 Graceful degradation
 Fail-soft systems
Operating System Concepts
2.22
Silberschatz, Galvin and Gagne 2002
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 highspeed buses or telephone lines.
 May be either client-server or peer-to-peer systems.
Operating System Concepts
2.23
Silberschatz, Galvin and Gagne 2002
Distributed Systems (cont)
 Requires networking infrastructure.
 Local area networks (LAN) or Wide area networks (WAN)
 Advantages of distributed systems.
 Resources Sharing
 Computation speed up – load sharing
 Reliability
 Communications
Operating System Concepts
2.24
Silberschatz, Galvin and Gagne 2002
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: guaranteed task completion
 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: absolute task priority
 Limited utility in industrial control of robotics
 Useful in applications (multimedia, virtual reality) requiring
advanced operating-system features.
Operating System Concepts
2.25
Silberschatz, Galvin and Gagne 2002
Handheld Systems
 Personal Digital Assistants (PDAs)
 Cellular telephones
 Issues:
 Limited memory
 Slow processors
 Small display screens.
Operating System Concepts
2.26
Silberschatz, Galvin and Gagne 2002
Migration of Operating-System Concepts and Features
Operating System Concepts
2.27
Silberschatz, Galvin and Gagne 2002