Download presentation
Presentation is loading. Please wait.
Published byMarybeth Mathews Modified over 8 years ago
1
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 OPERATING SYSTEMS DESIGN AND IMPLEMENTATION Third Edition ANDREW S. TANENBAUM ALBERT S. WOODHULL (With additions for U08225 by F Mitchell) Chapter 1 Introduction
2
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 The Modern Computer System Figure 1.1 A computer system consists of hardware, system programs, and application programs.
3
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 What Is an Operating System? The operating system has two basic functions of the operating system It is an extended machine or virtual machine – Easier to program than the underlying hardware It is a resource manager – Shares resources in time and space
4
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Operating System Generations 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 Generation 5 (2000 – Present) Mobile and networked
5
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Pluggable computers
6
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 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.
7
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Early Batch System (2) Figure 1-2. An early batch system. (c) Operator carries input tape to 7094. (d) 7094 does computing.
8
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Early Batch System (3) Figure 1-2. An early batch system. (e) Operator carries output tape to 1401. (f) 1401 prints output.
9
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Early Batch System (4) Figure 1-3. Structure of a typical FMS job.
10
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Multiprogramming Figure 1-4. A multiprogramming system with three jobs in memory.
11
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Main and mini frames Mainframe – very large computer – Still in use today – Used to provide resources to multiple users (multiprogramming) – Now used in a similar role, but also in large compute intensive tasks – Superseded by supercomputer in terms of size Miniframe – A smaller (and cheaper) version of the mainframe – Role now filled by small mainframes and servers
12
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Personal Computers Dominated by Intel variant CPUs Computers for the novice – more requirements on user friendliness Initial cost, software cost and repair cost more of an issue Focus on applications, not development
13
U08225 – Introduction to Operating Systems – week 1 lecture Faye Mitchell Mobile computers ● Many of the issues of earlier computers – lack of processing power, space, memory etc. ● Also awkward IO! ● Potential for pervasive and ubiquitous computing ● Often heavily networked
14
U08225 – Introduction to Operating Systems – week 1 lecture Faye Mitchell Networked computers ● Back to mainframe days? ● Information on demand culture (another strand of ubiquitous computing) ● Computing grids – power and storage on demand for large companies and complex problems ● Cloud computing – virtualisation plus off the shelf PCs = compute power & storage on demand for everybody ● Web 2.0 – media rich highly connected sites ● Rise of social computing
15
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Some basic concepts Process – a program in execution Memory – an accessible place where data or a process is kept when it is being used File – an organised structure for the storage of a process image or it's data IO device – a piece of (normally) hardware used to interact with the computer
16
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 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.
17
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Processes 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.
18
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 System Calls (1) Figure 1-9. The MINIX system calls. fd is a file descriptor; and n is a byte count. Process Management
19
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 System Calls (2) Signals Figure 1-9. The MINIX system calls. fd is a file descriptor; and n is a byte count.
20
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 System Calls (3) File Management Figure 1-9. The MINIX system calls. fd is a file descriptor; and n is a byte count.
21
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 System Calls (4) Dir. & File System Mgmt. Figure 1-9. The MINIX system calls. fd is a file descriptor; and n is a byte count.
22
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 System Calls (5) Protection Figure 1-9. The MINIX system calls. fd is a file descriptor; and n is a byte count.
23
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 System Calls (6) Time Management Figure 1-9. The MINIX system calls. fd is a file descriptor; and n is a byte count.
24
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 The fork Call in the Shell Figure 1-10. A stripped-down shell. Throughout this book, TRUE is assumed to be defined as 1.
25
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Main OS types (1) Monolithic kernel – Everything is in the same place, spends a lot of time in kernel space – Potentially more efficient, but considerably harder to keep robust – Early Windows Micro kernel – Only key functionality is in kernel space, most is in user space – Considerably more swapping between kernel and user space which takes time, but potentially much more robust – Minix, partially modern windows
26
U08225 – Introduction to Operating Systems – week 1 lecture Faye Mitchell Main OS types (2) ● Modular kernel ➢ Kernel is configured to have only what is needed – relies on ability to recompile kernel ➢ Half way house between Monolithic and Micro – more efficient than Micro, more stable than Monolithic ➢ Linux
27
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Operating System Structure Figure 1-16. The 11 steps in making the system call read(fd, buffer, nbytes).
28
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 File Systems (1) Figure 1-6. A file system for a university department.
29
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 File Systems (2) Figure 1-7. (a) Before mounting, the files on drive 0 are not accessible. (b) After mounting, they are part of the file hierarchy.
30
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 File Systems (3) Figure 1-8. Two processes connected by a pipe.
31
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 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
32
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Layered Systems (1) Figure 1-17. A simple structuring model for a monolithic system.
33
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Layering in Practice ● Operating systems normally have a user space mode and a kernel/privilege space mode ● Privileged instructions (ones that change the configuration of the machine) are only executed in kernel space ● Programs that wish to execute a privileged instruction, trap to kernel space
34
U08225 – Introduction to Operating Systems – week 1 lecture Faye Mitchell Aside - Virtualisation ● Virtualisation is becoming very important even on desktop machines – layering helps here as well ● Intel variant architecture supports 4 rings of privilege ● Ring 0 is where the kernel runs, problems here can crash the machine ● Ring 3 is where user apps run, problems here should not crash the machine ● Conventionally, rings 1 & 2 are not used ● IVT and AMD-V add (incompatible) instructions to the CPU and a new VM control block to create a new ring 1 ● The host operating system can control ring 0, thus protecting the machine, but the VMs can control their own ring 1, thus speeding up access, without compromising security
35
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Client-Server Model (1) Figure 1-20. The client-server model.
36
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 Client-Server Model (2) Figure 1-21. The client-server model in a distributed system.
37
U08225 – Introduction to Operating Systems – week 1 lecture Faye Mitchell Mobile and embedded ● Very big topic at the moment ● We'll look at this a little throughout this module ● We'll look at it in more detail in U08284
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.