Tanenbaum - PowerPoint PPT Presentation

About This Presentation
Title:

Tanenbaum

Description:

OPERATING SYSTEMS DESIGN AND IMPLEMENTATION Third Edition ANDREW S. TANENBAUM ALBERT S. WOODHULL Chapter 1 Introduction Tanenbaum & Woodhull, Operating Systems ... – PowerPoint PPT presentation

Number of Views:880
Avg rating:3.0/5.0
Slides: 50
Provided by: SteveA307
Learn more at: https://www.cise.ufl.edu
Category:

less

Transcript and Presenter's Notes

Title: Tanenbaum


1
OPERATING SYSTEMSDESIGN AND IMPLEMENTATIONThird
EditionANDREW S. TANENBAUMALBERT S.
WOODHULLChapter 1Introduction
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
2
The Modern Computer System
Figure 1.1 A computer system consists of
hardware, system programs, and application
programs.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
3
What Is an Operating System?
  • Two basic functions of the OS
  • Extended machine or virtual machine
  • Easier to program than the underlying hardware
  • Resource manager
  • Shares resources in time and space
  • User interface to OS is what we see,
  • But really it is just another program.

Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
4
Operating System Generations(Tannenbaum H/W)
  • Generation 1 (1945 55) Vacuum tubes and
    plugboards
  • Generation 2 (1955 65)Transistors and batch
    systems
  • Generation 3 (1965 80)ICs and multiprogramming
  • Generation 4 (1980 Present)Personal computers
  • (My gen 5 multicore systems pervasive
    computing)

Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
5
Remmington Rand 409 (Univac)
Program is in plugboard!!!
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
6
IBM 650
card sorter (L) reader/punch (C), computer (R)
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
7
IBM 650
front panel (L) drum (B), tubes (TL)
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
8
Vacuum Tube (IBM 650)
IBM 650 announced1953, sold until1962
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
9
Sperry-Univac AN-UYK/20
Program from toggle switches on front panel Note
64K of core memory (bottom half)
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
10
Operating System Generations(Silberschatz and
others S/W)
  • Generation 1 (50s on) Resident Monitor user
    operator
  • Single application program at a time
  • Generation 2 (late 50s 60s)Batch systems
    user not operator, JCL
  • 2a uniprogrammed batch
  • 2b multiprogrammed batch
  • Generation 3 (1960s on)Timesharing systems
  • Generation 4 (1980 Present)Personal computers
    user operator

Did they improved productivity?
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
11
Operating System Generations(Silberschatz and
others S/W)
  • Generation 5 (1980 present) Network Operating
    Systems
  • Remote commands, interoperability key
  • Generation 6 (late 80s present)Distributed
    Operating Systems
  • Transparency key homogenous systems
  • Generation 7 (1990s on)Cooperative Autonomous
    Systems independent systems integration key
  • Resource discovery, negotiation, etc.
  • e.g., Service Oriented Architectures

Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
12
Resident Monitor
  • Users reserved time on machine (hour scale)
  • If not done when time up, too bad try again
    later
  • Useful to have a user interface and RM to allow
    you to
  • Read program and data in from card reader, tape
    drive, etc.
  • Run program
  • Print results
  • Also had utility programs
  • Compiler
  • Linker
  • Loader
  • Editor
  • Also had librariesSets of convenient procedures
    reused often
  • Math functions
  • Print formatting
  • I/O access

Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
13
Early Batch System (1)
Figure 1-2. An early batch system. (a)
Programmers bring cards to 1401. (b)1401 reads
batch of jobs onto tape.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
14
Early Batch System (2)
Figure 1-2. An early batch system. (c) Operator
carries input tape to 7094. (d) 7094 does
computing.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
15
Early Batch System (3)
Figure 1-2. An early batch system. (e) Operator
carries output tape to 1401. (f) 1401 prints
output.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
16
Early Batch System (4)
Figure 1-3. Structure of a typical FMS job.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
17
Uniprogrammed Batch System
User Program
Fence register
Operating System/RM
Uniprogramming single process runs at a
time Protect OS/RM using fence register test
vs. address
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
18
Uniprogrammed Batch System
Job 1
Job 2
Job N

OS
OS
OS
time
While there is another job Read control card for
next job Load job Run job
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
19
Uniprogrammed Batch System
I/O
CPU-bound job
CPU
activity
CPU burst
I/O burst
I/O
I/O-bound job
CPU
time
I/O-bound jobs underutilize CPU Even CPU-bound
jobs use little CPU when doing I/O Desirable to
overlap CPU use of one job with I/O of other
job(s)
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
20
Multiprogramming
Figure 1-4. A multiprogramming system with three
jobs in memory.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
21
Multiprogrammed Batch System
I/O-3
CPU-3
activity
I/O-2
CPU-2
I/O-1
CPU-1
OS
time
Doing I/O (3 channels)
Has CPU Waiting for CPU or event
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
22
Processes
Figure 1-5. A process tree. Process A created two
child processes, B and C. Process B created
three child processes, D, E, and F.
How to create a child process?
Where does the first process come from?
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
23
File Systems (1)
Figure 1-6. A file system for a university
department.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
24
File Systems (2)
  • Figure 1-7.
  • Before mounting, the files on drive 0 are not
    accessible.
  • After mounting, they are part of the file
    hierarchy.

Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
25
File Systems (3)
Figure 1-8. Two processes connected by a pipe.
What is a pipe, anyway?
Not that kind of pipe!
A pipe is a character stream one process can
write to it, the other one reads from it.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
26
System Calls (1)
Process Management
Figure 1-9. The MINIX system calls. pid is
process ID statloc and status return exit
status name is filename argv is argument list
envp is environment pointer.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
27
System Calls (2)
Signals
Figure 1-9. The MINIX system calls. sig is signal
number, act and oldact are procedures, how says
what to do, old allows old signal mask to be
remembered.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
28
System Calls (3)
File Management
Figure 1-9. The MINIX system calls. fd is a file
descriptor mode determines access mode nbytes
is a byte count buf holds status info.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
29
System Calls (4)
Directory File System Mgmt.
Figure 1-9. The MINIX system calls. s is return
status namex, dirname, and special are
file/directory names mode is protection mode.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
30
System Calls (5)
Protection
Figure 1-9. The MINIX system calls. name is
file/directory name mode is protection mode,
complmode is its inverse uid and owner are user
ID gid and group are group ID.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
31
System Calls (6)
Time Management
Figure 1-9. The MINIX system calls. tp and timep
are pointers to time variable file is filename.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
32
The fork Call in the Shell
Figure 1-10. A stripped-down shell. Throughout
this book, TRUE is assumed to be defined as 1.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
33
Processes
Activation frames with non-persistent variables
Stack and data grow and shrink
Persistent variables, constants
Instructions
Figure 1-11. Processes have three segments text,
data, and stack. In this example, all three are
in one address space, but separate instruction
and data space is also supported.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
34
Processes
Used stack space
Free stack space
Free heap space
Return from first procedure
Return from second procedure
Used heap space
Call a procedure
Call another procedure
Activation frames with non-persistent variables
Stack and data grow and shrink
Allocate another var
Persistent variables, constants
Allocate a variable
Free a variable
Instructions
A process uses up space in data segment as
objects are allocated, must increase space if
none left.
A process grows the stack as procedures/methods
are called, shrinks it as they return.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
35
System Calls for File Management (1)
Figure 1-12. The structure used to return
information for the stat and fstat system calls.
In the actual code, symbolic names are used for
some of the types.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
36
I/O Redirection
In the shell cat - lt file.txt grep foo
sort gt silly.txt The 'lt' character redirects
input to come from a file The '' characters
indicate pipes The 'gt' character redirects the
output to a file cat with the '-' option reads
from stdin, and by default it writes to stdout.
Both grep and sort read from stdin and write to
stdout (cin and cout in C) Pipes allow linking
a sequence of operations together without having
to make temporary files between each step
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
37
System Calls for File Management (2)
NB need two file descriptors read (0) and
write (1)

Figure 1-13. First part of a skeleton for setting
up a two-process pipeline.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
38
System Calls for File Management (3)
Frees slot 0 in PFT
Copies read end of pipe to slot 0 in PFT

Figure 1-13. Last part of a skeleton for setting
up a two-process pipeline.
Now when process1 writes to STDOUT, it appends to
pipe And when process2 reads from STDIN, it
dequeues from pipe
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
39
System Calls for Directory Management (1)
file name
i-node number
link(/usr/jim/memo,/usr/ast/note)
Figure 1-14. (a) Two directories before linking
/usr/jim/memo to asts directory. (b) The same
directories after linking.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
40
System Calls for Directory Management (2)
mount(/dev/cdrom0,/mnt,0)
Figure 1-15. (a) File system before the mount.
(b) File system after the mount.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
41
Operating System Structure
Figure 1-16. The 11 steps in making the system
call read(fd, buffer, nbytes).
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
42
Basic Structure for Operating System
  1. A main program that invokes the requested service
    procedure
  2. A set of service procedures that carry out the
    system calls
  3. A set of utility procedures that help the service
    procedures

Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
43
Layered Systems (1)
Figure 1-17. A simple structuring model for a
monolithic system.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
44
Layered Systems (2)
Figure 1-18. Structure of the THE operating
system.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
45
Virtual Machines
Figure 1-19. The structure of VM/370 with CMS.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
46
Client-Server Model (1)
Figure 1-20. The client-server model.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
47
Client-Server Model (2)
Figure 1-21. The client-server model in a
distributed system.
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
48
Client-Server Model (3)
wait for request
Server
request
reply
reply
request
wait for reply
Client
wait
time
Client-server synchronous communication
Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
49
Summary
  1. OS definition(s) and functions
  2. OS history, functionalities
  3. OS components
  4. System calls
  5. OS Architectures

Tanenbaum Woodhull, Operating Systems Design
and Implementation, (c) 2006 Prentice-Hall, Inc.
All rights reserved. 0-13-142938-8
Write a Comment
User Comments (0)
About PowerShow.com