Operating Systems Part I: Introduction. “I think that there is a world market for five...
-
Upload
dakota-tumlin -
Category
Documents
-
view
212 -
download
0
Transcript of Operating Systems Part I: Introduction. “I think that there is a world market for five...
![Page 1: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/1.jpg)
Operating Systems
Part I: Introduction
![Page 2: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/2.jpg)
“I think that there is a world market for five computers”
- Thomas J. Watson (1945)
![Page 3: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/3.jpg)
Why Study Operating Systems?
We want to have an efficient O/S because it– consumes more resources than any other program. – is the most complex program. – is necessary for any use of the computer. – is used by many users.
Efficiency is measured through– Functionality– Performance: Time and Utilization– Convenience and Cost
![Page 4: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/4.jpg)
Goals of This Course
Understand what an operating system is Understand the key components of an
operating system Have a deeper understanding of common
operating systems in the market (e.g. Windows, Unix, MS-DOS) and the issues associated with them
To be able to use performance measures
![Page 5: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/5.jpg)
What is an O/S?
•A layer of abstraction between the HW and SW•A resource coordinator•Virtual machine•Reactive system
![Page 6: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/6.jpg)
Operating Systems: A Definition
A collection of programs that integrate the hardware resources of the computer and make those resources available to the user in a productive, timely, and efficient manner
![Page 7: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/7.jpg)
Operating Systems Ease the Pain
Performs the interface task with the hardware (file operations, memory paging, etc.) which should have been done by the user if the OS did not exist
High-level interface (GUI, command line a.k.a. CUI) The O/S’s capability for multiuser and multitasking
utilize the hardware efficiently Makes visible the “virtual” component of the system Allows program interaction
![Page 8: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/8.jpg)
Why are Operating Systems Difficult to Create and Maintain?
Size– Too big for one person; current systems have
millions of lines of code and involve 10-100 man years to build
Lifetime – Operating systems remain longer than the
programmers who originally wrote them. Code is written and rewritten and original intent is forgotten (Unix designed to be cute, small system - now several volumes thick!)
![Page 9: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/9.jpg)
Why are Operating Systems Difficult to Create and Maintain?
Complexity – The system must do difficult things -- deal with ugly
I/O devices, multiplexing/juggling act, handle errors
Multitasking– Must do several things at once.
General purpose
![Page 10: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/10.jpg)
A Brief History: Early 1950’s, Mainframes Rule!
Early systems– No O/S! Programmer is also operator– Large machines run from a console; programs loaded through
switches and card readers
Simple batch systems were the first real OS– Setup time was a problem -> hire an operator– Operator ran related jobs together– O/S was a simple program stored in one part of memory
Loads a single job from card reader into memory Transfers control from one job to the next
![Page 11: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/11.jpg)
Offline Processing
Allowed jobs to be read ahead of time onto tape
CardReader CPU Line
printer
CardReader CPU Line
printer
TapeDrive
TapeDrive
TapeDrive
TapeDrive
On-line processing
Off-line processing
![Page 12: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/12.jpg)
History: Spooling
Allowed jobs to be read ahead onto disk Spool (Simultaneous Peripheral Operation On-
Line)
CardReader CPU
Lineprinter
disk
![Page 13: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/13.jpg)
Multiprogrammed Systems
Multiprogrammed batch systems provided increased utilization– Keeps several jobs in memory simultaneously– I/O processing of one job overlaps with computation
of another– Analogy: Lawyer working on several cases; while
waiting to go to trial on one, can work on another– Needs CPU scheduling
![Page 14: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/14.jpg)
Timesharing/Multitasking Systems
Timesharing supported interactive use– Each user feels as if
he/she has the entire machine
– Tries to optimize response time
– Based on time-slicing; divide CPU equally among others
![Page 15: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/15.jpg)
Desktop Systems
First appeared in the 1970s More popularly known as personal computers
(PCs) Breakthroughs in hardware allowed downsizing
from expensive mainframes
![Page 16: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/16.jpg)
Multiprocessor Systems
Also known as parallel systems or tightly-coupled systems
Three main advantages– Increased throughput (more CPUs = more work in less time)– Economy of scale (saves money, CPUs share peripherals)– Increased reliability (provides redundancy and fault tolerance)
Symmetric multiprocessing (SMP): All CPUs do the same thing
Asymmetric multiprocessing: each CPU has specific role (usually master-slave)
![Page 17: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/17.jpg)
Distributed (Loosely-Coupled) Systems
Facilitates use of geographically distributed computing resources Supports communications between parts of a job or different jobs Supports sharing of distributed resources, both hardware and
software Client-server systems vs. Peer-to-peer systems
![Page 18: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/18.jpg)
Clustered Systems
Makes several CPUs work together to accomplish computational task
Most likely share storage and linked through a local area network (LAN)
Possible clustering schemes:– Symmetric mode (two or more hosts running applications and
monitoring each other)– Asymmetric clustering (one is in hot standby mode while
another is running applications; switches to backup if active fails)
![Page 19: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/19.jpg)
Real Time Systems Used for specialized applications: subway systems,
flight-control, factories, power plants Basic idea: O/S guarantees response to physical
events will occur within a fixed amount of time Problem faced : Schedule activities so as to meet all
time constraints Hard real time system
– Deadline is critical– Typically used to control a device
Soft real time system– Deadline is important but not critical– Example : Video applications (Use in PC environment)
![Page 20: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/20.jpg)
Handheld Systems
Used in PDAs and cellular phones Common concerns:
– Limited main memory– Processor speed– Small display screens
![Page 21: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/21.jpg)
General Structure of an O/S
Resident Programs
Programs which are critical to the operation of the system
KERNEL
Non-resident Programs
Loaded into memory only when needed
![Page 22: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/22.jpg)
An Example: MS-DOS Structure
Memory resident components– Command interface shell (eg. ver, dir, date, time) :
COMMAND.COM– Set of I/O routines which control each I/O devices
(drivers) -- e.g. BIOS : IO.SYS– File Management System : MSDOS.SYS
Non-resident components– FORMAT.COM, XCOPY.EXE, LABEL.EXE, etc.
![Page 23: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/23.jpg)
How MS-DOS Programs are Loaded in Main Memory
At System Start-up Running a Program
![Page 24: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/24.jpg)
Operating System Components
Process Management– Process: a program in execution– Keeps track of each process and it’s state– Create, delete, suspend, resume processes;
synchronize process communications, handle deadlocks
– Possibly support threads (executable parts of a process)
![Page 25: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/25.jpg)
Operating System Components
Main Memory Management– Keep track of which parts of memory are in
use– Allocates and deallocates memory as
needed– Decides which processes must be loaded in
main memory when space becomes available
![Page 26: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/26.jpg)
Operating System Components
File Management– Keeps tracks of available space on the system– Maintains directory structure and hierarchy– Supports file manipulation commands– Keeps track of file information (inode, name,
timestamp) I/O System Management
– Allows for a standard methodology for access of each device
– Use of device drivers for modularity
![Page 27: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/27.jpg)
Operating System Components
Secondary Storage Management– Free space management– Storage allocation– Disk scheduling
Networking– Transfer protocols– Routing and connection strategies
![Page 28: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/28.jpg)
Operating System Components
Protection System– Provide mechanism for controlling access to
programs, processes, or users– Essential in multitasking and multiuser systems
Command Interpreter System– GUI vs. Command Line Interface– Redirection, Piping, and Parameter Passing
![Page 29: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/29.jpg)
Operating Systems Architectures
Monolithic Layered Virtual Machine Microkernel
![Page 30: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/30.jpg)
Monolithic
Easy to implement “The Big Mess” –
virtually no structure! Kernel is one large
structure Each procedure is visible
to every other procedure Not used anymore
![Page 31: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/31.jpg)
Layered
Not easy to implement because some functionalities are mutually dependent.
Inefficient because it requires a high number of traversals of interfaces
![Page 32: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/32.jpg)
Virtual Machine
Each user has a “virtual machine” and he can choose which OS to run on that machine
Elegant, but does not deal with questions of resource management and responsiveness
Non-virtual Machine Virtual Machine
![Page 33: Operating Systems Part I: Introduction. “I think that there is a world market for five computers” - Thomas J. Watson (1945)](https://reader035.fdocuments.us/reader035/viewer/2022081602/551b69b1550346a6148b4b8f/html5/thumbnails/33.jpg)
Microkernel
Used in Mac/OSF/NT Takes out as much
functionality as possible from kernel -- allows modularity and portability across platforms
Interactions between processes involve the kernel, thereby requiring high efficiency in transfer