Download presentation
Presentation is loading. Please wait.
Published byDamon Parsons Modified over 9 years ago
1
Introduction to Operating Systems Chapter 1
2
cs431 -cotter2 Lecture Objectives Understand the relationship between computing hardware, operating system, and user level applications Be able to discuss the different categories of system calls common to Linux or Windows operating systems. Discuss how the evolution of computing hardware and the evolution of operating systems have affected each other.
3
cs431 -cotter3 Basic Computer System Operation cachecache CPU (*N) device Instructions and data Memory Instructions data I/O Request datainterrupt DMA
4
cs431 -cotter4 PC Hardware Review
5
cs431 -cotter5 CPU Pipelining Figure 1-7. (a) A three-stage pipeline. (b) A superscalar CPU. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
6
cs431 -cotter6 Figure 1-8. (a) A quad-core chip with a shared L2 cache. (b) A quad-core chip with separate L2 caches. Multithreaded and Multicore Chips Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
7
cs431 -cotter7 Figure 1-9. A typical memory hierarchy. The numbers are very rough approximations. Memory (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
8
cs431 -cotter8 Questions when dealing with cache: When to put a new item into the cache. Which cache line to put the new item in. Which item to remove from the cache when a slot is needed. Where to put a newly evicted item in the larger memory. Memory (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
9
cs431 -cotter9 Figure 1-10. Structure of a disk drive. Disks Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
10
cs431 -cotter10 Figure 1-11. (a) The steps in starting an I/O device and getting an interrupt. I/O Devices Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
11
cs431 -cotter11 Interrupt functions Most operating systems are interrupt driven Interrupt transfers control to interrupt service routine through the interrupt vector Save address of interrupted instruction Disable interrupts during processing A trap is a software generated interrupt
12
cs431 -cotter12 I/O Structure Control returns to user when I/O completes –wait instruction idles CPU –wait loop (contention for memory) –only 1 I/O request outstanding at any time Control returns to user without waiting for I/O –system call –device-status table –OS modifies table entry to include interrupt
13
cs431 -cotter13 Hardware Protection Schemes Dual-Mode Operation –user mode –monitor mode / kernel mode I/O Protection Memory Protection –base register –limit register CPU Protection –timer
14
cs431 -cotter14 Figure 1-12. The structure of a large Pentium system Buses Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
15
cs431 -cotter15 Processes Address spaces Files Input/Output Protection The shell Evolution repeats itself Large memories Protection hardware Disks Virtual memory Operating System Concepts Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
16
cs431 -cotter16 Processes Figure 1-13. A process tree. Process A created two child processes, B and C. Process B created three child processes, D, E, and F. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
17
cs431 -cotter17 Figure 1-14. A file system for a university department. Files (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
18
cs431 -cotter18 Figure 1-15. (a) Before mounting, the files on the CD-ROM are not accessible. (b) After mounting, they are part of the file hierarchy. Files (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
19
cs431 -cotter19 Figure 1-16. Two processes connected by a pipe. Files (3) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
20
cs431 -cotter20 Figure 1-17. The 11 steps in making the system call read(fd, buffer, nbytes). System Calls Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
21
cs431 -cotter21 Figure 1-18. Some of the major POSIX system calls. System Calls for Process Management Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
22
cs431 -cotter22 Figure 1-18. Some of the major POSIX system calls. System Calls for File Management (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
23
cs431 -cotter23 Figure 1-18. Some of the major POSIX system calls. System Calls for File Management (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
24
cs431 -cotter24 Figure 1-18. Some of the major POSIX system calls. Miscellaneous System Calls Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
25
cs431 -cotter25 Figure 1-19. A stripped-down shell. A Simple Shell Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
26
cs431 -cotter26 Figure 1-20. Processes have three segments: text, data, and stack. Memory Layout Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
27
cs431 -cotter27 Figure 1-21. (a) Two directories before linking /usr/jim/memo to ast’s directory. (b) The same directories after linking. Linking Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
28
cs431 -cotter28 Figure 1-22. (a) File system before the mount. (b) File system after the mount. Mounting Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
29
cs431 -cotter29 Figure 1-23. The Win32 API calls that roughly correspond to the UNIX calls of Fig. 1-18. Windows Win32 API Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
30
cs431 -cotter30 Monolithic systems – basic structure: A main program that invokes the requested service procedure. A set of service procedures that carry out the system calls. A set of utility procedures that help the service procedures. Operating Systems Structure Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
31
cs431 -cotter31 Figure 1-24. A simple structuring model for a monolithic system. Monolithic Systems Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
32
cs431 -cotter32 Figure 1-25. Structure of the THE operating system. Layered Systems Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
33
cs431 -cotter33 Figure 1-26. Structure of the MINIX 3 system. Microkernels Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
34
cs431 -cotter34 Figure 1-27. The client-server model over a network. Client-Server Model Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
35
cs431 -cotter35 Virtual Machines Pushes the layered concept to the next step Treats OS and hardware as though they were both hardware by providing a software (virtual) interface to the OS that is identical to the hardware interface OS creates the illusion of several different processes, each executing on its own processor with its own (virtual) memory
36
cs431 -cotter36 Virtual Machines CPU scheduling creates the appearance that each process has its own processor. Spooling and a file system can provide “virtual” line printers and “virtual” card readers
37
cs431 -cotter37 Figure 1-28. The structure of VM/370 with CMS. Virtual Machines (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
38
cs431 -cotter38 Figure 1-29. (a) A type 1 hypervisor. (b) A type 2 hypervisor. Virtual Machines (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
39
cs431 -cotter39 JAVA Virtual Machines Java program VM Java Cmds Java program VM Java Cmds Java program VM Java Cmds SPARCPowerPCIntel
40
cs431 -cotter40 Virtual Machine Advantages / Disadvantages Provides complete isolation and protection of resources between processes. (This also can affect the ability to share between processes). Provides a good vehicle for reducing system level complexity of IT systems Requires hardware support to allow execution of privileged instructions in user mode.
41
cs431 -cotter41 The C language Header files Large programming projects The model of run time The World According to C Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
42
cs431 -cotter42 Figure 1-30. The process of compiling C and header files to make an executable. The Model of Run Time Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
43
cs431 -cotter43 Summary Overview of Computer Hardware Different OS types OS Components –Concepts –System Calls –Structure OS Programming Language
44
cs431 -cotter44 Questions: What is multi-programming? Why is it important in OSs? What is the difference between a system call and a local function call? What is the difference between user mode and kernel mode?What is the difference between user mode and kernel mode? Why are Virtual Machines becoming popular today in PCs? How is the Client / Server model being used today?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.