Title: 1.1 What is an operating system
1Introduction
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
2Introduction
- A computer system consists of
- hardware
- system programs
- application programs
3What 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
4History of Operating Systems (1)
- 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
5History of Operating Systems (2)
- 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
6History of Operating Systems (3)
- Structure of a typical FMS job 2nd generation
7History of Operating Systems (4)
- Multiprogramming system
- three jobs in memory 3rd generation
8The 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
9Computer Hardware Review (1)
Monitor
Bus
- Components of a simple personal computer
10Computer Hardware Review (2)
- (a) A three-stage pipeline
- (b) A superscalar CPU
11Computer Hardware Review (3)
- Typical memory hierarchy
- numbers shown are rough approximations
12Computer Hardware Review (4)
- Structure of a disk drive
13Computer Hardware Review (5)
- One base-limit pair and two base-limit pairs
14Computer Hardware Review (6)
(a)
(b)
- (a) Steps in starting an I/O device and getting
interrupt - (b) How the CPU is interrupted
15Computer Hardware Review (7)
- Structure of a large Pentium system
16Operating System Concepts (1) - Processes
- A process is a program in execution
- Swapping of a process Process table entry
- System calls to create and terminate processes
- System calls to allocate/deallocate memory
- System calls for communication - signals
17Operating System Concepts (2) - Processes
- A process tree
- A created two child processes, B and C
- B created three child processes, D, E, and F
18Operating System Concepts (3) -Deadlocks
- (a) A potential deadlock. (b) an actual deadlock.
19Operating System Concepts (4) - Files
- Present the programmer with nice, clean,
abstract, device-independent files. - Concept of directory to group files together
- System calls to create/remove directories and
create/remove files. Hierarchies. - Process trees ! Directories
- A file can be specified by a path name absolute
(from root), relative (from current working
directory).
20Operating System Concepts (5) - Files
- File system for a university department
21Operating System Concepts (6) - Files
- Protection of files and directories, e.g. UNIX
the rwx bits 9 bits (owner/group/others)
rwxr-xr-- - File Descriptor a number assigned to a file.
- Mounting file systems.
- Special files block special files, character
special files standard input (fd0), standard
output (fd1), standard error (fd2).
22Operating System Concepts (7) - Files
- Before mounting,
- files on floppy are inaccessible
- After mounting floppy on b,
- files on floppy are part of file hierarchy
23Operating System Concepts (8) - Pipes
- Two processes connected by a pipe. Read/Write -
transparent for processes.
24Operating System Concepts (8) - Shell
- The shell is a program that acts as an interface
between the user and the OS. - Unix several shells (e.g. csh, ksh).
- MSDOS command prompt.
- Prompt, process, std input, output, creates
processes.
25Steps in Making a System Call
- There are 11 steps in making the system call
- read (fd, buffer, nbytes)
26Some System Calls For Process Management
27Some System Calls For File Management
28Some System Calls For Directory Management
29Some System Calls For Miscellaneous Tasks
30System 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 / -
-
31System Calls (2)
- Processes have three segments text, data, stack
32System Calls (3)
- (a) Two directories before linking/usr/jim/memo
to ast's directory - (b) The same directories after linking
33System Calls (4)
- (a) File system before the mount
- (b) File system after the mount
34System Calls (5)
35Operating System Structure
- Monolithic
- Layered
- Virtual Machines
- Client-Server
36Operating System Structure (1)
User program 1
User program 2
Kernel call
4
1
Service procedure
3
2
dispatch table
37Operating System Structure (1)
- Simple structuring model for a monolithic system
38Operating System Structure (2)
- Structure of the THE operating system
39Operating System Structure (3)
- Structure of VM/370 with CMS
40Operating System Structure (4)
41Operating System Structure (5)
- The client-server model in a distributed system
42Metric Units
The metric prefixes