contact information office: 225 neville hall office hours: monday and wednesday 12:00-1:00 e-main:...
TRANSCRIPT
![Page 1: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/1.jpg)
Contact Information
Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: [email protected] Phone: 581-3967 Textbook: Tanenbaum, Modern Operating Systems
(2nd edition) URL: http://umcs.maine.edu
/~dickens/COS431/COS431.html
![Page 2: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/2.jpg)
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
![Page 3: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/3.jpg)
Introduction
A computer system consists of hardware system programs application programs
![Page 4: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/4.jpg)
Hardware: Physical Devices:
Memory, CPU, I/O devices…. Microarchitecture: Executes machine-level
instructions. Hardware or firmware. Machine language: Hardware and
instructions visible to an assembly language program.
System Components
![Page 5: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/5.jpg)
Introduction
Operating System: Hides complexity of hardware and
provides simplified set of instructions.
![Page 6: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/6.jpg)
Introduction
System programs: Generally execute in user mode. Command interpreter (shell),
compilers, editors, …..
![Page 7: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/7.jpg)
So 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
Don’t want to program I/O devices, handle interrupts, etc.
It is a resource manager (and scheduler) Each program gets time with the resource
E.g., CPU, I/O devices, memory Each program gets space on the resource
E.g., Disk space.
![Page 8: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/8.jpg)
History of Operating Systems
First generation 1945 - 1955 vacuum tubes, plug boards Scheduling algorithm was a signup sheet.
Second generation 1955 – 1965 Operator loading in programs from card deck one at
a time. Led to batch systems
![Page 9: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/9.jpg)
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
![Page 10: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/10.jpg)
History of Operating Systems (3)
Structure of a typical FMS job – 2nd generation
![Page 11: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/11.jpg)
Early Operating Systems
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 pack to monitor
![Page 12: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/12.jpg)
Memory Layout for a Simple Batch System
![Page 13: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/13.jpg)
Third generation 1965 – 1980 Machines were very expensive and CPU frequently
idle. Led to multiprogramming.
![Page 14: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/14.jpg)
Multiprogramming system three jobs in memory – 3rd generation
![Page 15: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/15.jpg)
Multiprogramming Batch Systems
Solution: Multiplex CPU between multiple jobs.
![Page 16: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/16.jpg)
OS Features Needed for Multiprogramming
Use of disk space to hold jobs not in system.
Job scheduling: Choose jobs to bring into memory.
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.
![Page 17: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/17.jpg)
Time-Sharing Systems–Interactive Computing
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 swapped in and out of memory to the disk. 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.
i.e., the shell Goal is to give the illusion that each user has own
machines. Response time is a priority.
![Page 18: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/18.jpg)
Computer Hardware Review
Components of a simple personal computer
Monitor
Bus
![Page 19: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/19.jpg)
Special registers: Program counter. Stack pointer. Process Status Word (PSW).
![Page 20: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/20.jpg)
Computer Hardware Review
(a) A three-stage pipeline(b) A superscalar CPU
![Page 21: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/21.jpg)
CPU has two modes: user and kernel. Application obtains OS services through a
system call. Traps to operating system and switches to
kernel mode.
![Page 22: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/22.jpg)
Typical memory hierarchy numbers shown are rough approximations
![Page 23: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/23.jpg)
Structure of a disk drive
![Page 24: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/24.jpg)
One base-limit pair and two base-limit pairs
![Page 25: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/25.jpg)
I/O Devices
Manufacturer provides device driver (talks to the device).
OS talks to device driver. Three ways to handle I/O operations:
Busy waiting. Interrupt driven Direct Memory Access (DMA)
![Page 26: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/26.jpg)
(a) Steps in starting an I/O device and getting interrupt(b) How the CPU is interrupted
(a) (b)
![Page 27: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/27.jpg)
Structure of a large Pentium system
![Page 28: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/28.jpg)
Operating System Concepts
A process tree A created two child processes, B and C B created three child processes, D, E, and F
![Page 29: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/29.jpg)
Operating System Concepts
(a) A potential deadlock. (b) an actual deadlock.
![Page 30: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/30.jpg)
Operating System Concepts
File system for a university department
![Page 31: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/31.jpg)
Operating System Concepts
Before mounting, files on floppy are inaccessible
After mounting floppy on b, files on floppy are part of file hierarchy
![Page 32: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/32.jpg)
Operating System Concepts
Two processes connected by a pipe
![Page 33: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/33.jpg)
Steps in Making a System Call
There are 11 steps in making the system call read (fd, buffer, nbytes)
![Page 34: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/34.jpg)
Some System Calls For Process Management
![Page 35: Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: dickens@umcs.maine.edudickens@umcs.maine.edu Phone:](https://reader030.vdocuments.mx/reader030/viewer/2022032607/56649eba5503460f94bc250d/html5/thumbnails/35.jpg)
Some System Calls For File Management