cs481 operating systems
TRANSCRIPT
1
1
CS481Operating Systems
Prof. Cris Pedregal - [email protected]
Textbook: Tanenbaum MOS 2ED
2
Learning: a social activity• you learn through your own work
• be a good student and classmate– make friends early, help each other
• you can (get/give) help without cheating
– come to class ready to work• ask questions and let others ask; be patient
• turn off your cellphone, personal stereo, etc.
• knowledge, competence, confidence
2
3
Introduction
Chapter 1
1.1 What is an operating system1.2 History of operating systems1.3 The operating system zoo1.4 Computer hardware review1.5 Operating system concepts1.6 System calls1.7 Operating system structure
4
Introduction
• A computer system consists of– hardware
– system programs
– application programs
3
5
What is an Operating System
• It is an extended machine– Hides the messy details which must be performed
– Presents user with a virtual machine, easier to use
• It is a resource manager– Each program gets time with the resource
– Each program gets space on the resource
6
History of Operating Systems (1)
Early batch system– bring cards to 1401– read cards to tape– put tape on 7094 which does computing– put tape on 1401 which prints output
4
7
History of Operating Systems (2)
• First generation 1945 - 1955– vacuum tubes, plug boards
• Second generation 1955 - 1965– transistors, batch systems
• Third generation 1965 – 1980– ICs and multiprogramming
• Fourth generation 1980 – present– personal computers
8
History of Operating Systems (3)
• Structure of a typical FMS job – 2nd generation
5
9
History of Operating Systems (4)
• Multiprogramming system– three jobs in memory – 3rd generation
10
The Operating System Zoo
• Mainframe operating systems
• Server operating systems
• Multiprocessor operating systems
• Personal computer operating systems
• Real-time operating systems
• Embedded operating systems
• Smart card operating systems
6
11
Computer Hardware Review (1)
• Components of a simple personal computer
Monitor
Bus
12
Computer Hardware Review (2)
(a) A three-stage pipeline(b) A superscalar CPU
7
13
Computer Hardware Review (3)
• Typical memory hierarchy– numbers shown are rough approximations
– but ratios are more important anyway
– still, what’s wrong with this picture?
14
Computer Hardware Review (4)
Structure of a disk drive
8
15
Computer Hardware Review (5)
One base-limit pair and two base-limit pairs
16
Computer Hardware Review (6)
(a) Steps in starting an I/O device and getting interrupt(b) How the CPU is interrupted
(a) (b)
9
17
Computer Hardware Review (7)
Structure of a large Pentium system
18
Summary Hardware Review
• Exists in real world, subject to constraints:– e.g., disk latency limited by spin speed
– wiring limits determine bus width/speed
• Different hardware components:– relative costs, speeds, determine architecture
– architecture constrains/induces OS
– tradeoffs induce complexity
– tradeoffs change with time
10
19
Operating System Concepts (1)
• A process tree– A created two child processes, B and C
– B created three child processes, D, E, and F
20
Operating System Concepts (2)
(a) A potential deadlock. (b) an actual deadlock.
11
21
Operating System Concepts (3)
File system for a university department
22
Operating System Concepts (4)
• Before mounting,– files on floppy are inaccessible
• After mounting floppy on b,– files on floppy are part of file hierarchy
12
23
Operating System Concepts (5)
Two processes connected by a pipe
24
Summary: OS Concepts
• Processes– Resources, Deadlocks
– Pipes
• Memory Management
• Input/Output
• Files
• Security
• The Shell
• Concept Recycling
• layers = abstraction• policies and
mechanisms• user versus supervisor
(kernel) mode– different spaces– different levels of
executions andprivileges
– system calls (kernel)application codelibrary code