introduction
DESCRIPTION
Introduction. 1.1 What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5 Operating system concepts 1.6 System calls 1.7 Operating system structure. Chapter 1. Introduction. A computer system consists of hardware - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/1.jpg)
1
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 2: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/2.jpg)
2
Introduction
• A computer system consists of– hardware– system programs– application programs
![Page 3: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/3.jpg)
3
Computer System layers
• Physical Devices: Power, wires, CRT, …
• Microarchitecture: Registers, ALU, CPU
• ISA: instruction set 30 – 50 instructions
• OS– Hides hardware complexity– Manages resources
• System Programs
![Page 4: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/4.jpg)
4
Supervisor vs user mode
• System programs are not the OS although they are often supplied with the OS
• Windows (X, Max, MS), Compilers, …– If you don’t like one, write your own
• Clock interrupt handler– you cannot write your own
• The boundary is blurred
![Page 5: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/5.jpg)
5
What is an Operating System
• It is an extended machine– Hides the messy details which must be performed
• 13 parameters to read from floppy controller
• 3 parameters to read system call
– 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
![Page 6: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/6.jpg)
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
![Page 7: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/7.jpg)
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
![Page 8: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/8.jpg)
8
History of Operating Systems (3)
• Structure of a typical FMS job – 2nd generation
![Page 9: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/9.jpg)
9
History of Operating Systems (4)
• Multiprogramming system – three jobs in memory – 3rd generation
![Page 10: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/10.jpg)
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
![Page 11: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/11.jpg)
11
Computer Hardware Review (1)
• Components of a simple personal computer
Monitor
Bus
![Page 12: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/12.jpg)
12
Computer Hardware Review (2)
(a) A three-stage pipeline(b) A superscalar CPU
![Page 13: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/13.jpg)
13
Computer Hardware Review (3)
• Typical memory hierarchy– numbers shown are rough approximations
![Page 14: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/14.jpg)
14
Computer Hardware Review (4)
Structure of a disk drive
![Page 15: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/15.jpg)
15
Computer Hardware Review (5)
One base-limit pair and two base-limit pairs
![Page 16: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/16.jpg)
16
Computer Hardware Review (6)
(a) Steps in starting an I/O device and getting interrupt(b) How the CPU is interrupted
(a) (b)
![Page 17: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/17.jpg)
17
Computer Hardware Review (7)
Structure of a large Pentium system
![Page 18: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/18.jpg)
18
Operating System Concepts (1)
• A process tree– A created two child processes, B and C– B created three child processes, D, E, and F
![Page 19: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/19.jpg)
19
Operating System Concepts (2)
(a) A potential deadlock. (b) an actual deadlock.
![Page 20: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/20.jpg)
20
Operating System Concepts (3)
File system for a university department
![Page 21: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/21.jpg)
21
Operating System Concepts (4)
• Before mounting, – files on floppy are inaccessible
• After mounting floppy on b,– files on floppy are part of file hierarchy
![Page 22: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/22.jpg)
22
Operating System Concepts (5)
Two processes connected by a pipe
![Page 23: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/23.jpg)
23
Steps in Making a System Call
There are 11 steps in making the system call read (fd, buffer, nbytes)
![Page 24: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/24.jpg)
24
Some System Calls For Process Management
![Page 25: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/25.jpg)
25
Some System Calls For File Management
![Page 26: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/26.jpg)
26
Some System Calls For Directory Management
![Page 27: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/27.jpg)
27
Some System Calls For Miscellaneous Tasks
![Page 28: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/28.jpg)
28
System Calls (1)
• A stripped down shell:
while (TRUE) { /* repeat forever */ type_prompt( ); /* display prompt */ read_command (command, parameters) /* input from terminal */ if (fork() != 0) { /* fork off child process */ /* Parent code */ waitpid( -1, &status, 0); /* wait for child to exit */} else { /* Child code */ execve (command, parameters, 0); /* execute command */ }}
![Page 29: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/29.jpg)
29
System Calls (2)
• Processes have three segments: text, data, stack
![Page 30: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/30.jpg)
30
System Calls (3)
(a) Two directories before linking/usr/jim/memo to ast's directory
(b) The same directories after linking
![Page 31: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/31.jpg)
31
System Calls (4)
(a) File system before the mount
(b) File system after the mount
![Page 32: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/32.jpg)
32
System Calls (5)
Some Win32 API calls
![Page 33: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/33.jpg)
33
Operating System Structure (1)
Simple structuring model for a monolithic system
![Page 34: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/34.jpg)
34
Operating System Structure (2)
Structure of the THE operating system
![Page 35: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/35.jpg)
35
Operating System Structure (3)
Structure of VM/370 with CMS
![Page 36: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/36.jpg)
36
Operating System Structure (4)
The client-server model
![Page 37: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/37.jpg)
37
Operating System Structure (5)
The client-server model in a distributed system
![Page 38: Introduction](https://reader031.vdocuments.mx/reader031/viewer/2022013004/568138eb550346895da09d98/html5/thumbnails/38.jpg)
38
Metric Units
The metric prefixes