Chapter01 Introduction
Chapter01 Introduction
Unless prior approval is obtained from lecturers, students are not allowed
to record (audio or video) lessons. Students are allowed to download and
use lesson materials from PSB Academy (including lecture recordings and
presentation slides) only for their personal revision. Different policies may
apply for lesson materials by our academic and industry partners - please
check with your School for more information.
Modern Operating Systems
Fourth Edition
Chapter 1
Introduction
Figure 1-2. Operating systems turn ugly hardware into beautiful abstractions.
Figure 1-3. An early batch system. (a) Programmers bring cards to 1401. (b) 1401 reads
batch of jobs onto tape.
Figure 1-3. An early batch system. (c) Operator carries input tape to 7094. (d)7094 does
computing. (e) Operator carries output tape to 1401. (f) 1401 prints output.
Figure 1-8. (a) A quad-core chip with a shared L2 cache. (b) A quad-core chip with
separate L2 caches.
Figure 1-9. A typical memory hierarchy. The numbers are very rough approximations.
Figure 1-11. (a) The steps in starting an I/O device and getting an interrupt.
Figure 1-11. (b) Interrupt processing involves taking the interrupt, running the interrupt
handler, and returning to the user program.
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.
Figure 1-15. (a) Before mounting, the files on the C D-ROM are not accessible. (b) After
mounting, they are part of the file hierarchy.
Figure 1-17. The 11 steps in making the system call read(fd, buffer, nbytes).
Process Management
Call Description
pid fork( ) Create a child process identical
to the parent
pid waitpid( pid, Wait for a child to terminate
&statloc, options)
s execve(name, argv, Replace a process' core image
environp)
exit(status) Terminate process execution
and return status
Figure 1-19. A stripped-down shell. Throughout this book, TRUE is assumed to be defined as 1.
File Management
Call Description
fd open(file, how, ...) Open a file for reading, writing, or both
s = close(fd) Close an open file
n = read(fd, buffer, nbytes) Read data from a file into a buffer
n = write(fd, buffer, nbytes) Write data from a buffer into a file
Position = Iseek(fd, offset, Move the file pointer
whence)
s = stat(name, &buf) Get a file's status information
Figure 1-20. Processes have three segments: text, data, and stacks
Figure 1-21. (a) Two directories before linking usr/jim/memo to ast’s directory. (b) The
same directories after linking.s
Figure 1-22. (a) File system before the mount. (b) File system after the mount.
Layer Function
5 The operator
4 User programs
3 Input/output management
2 Operator-process communication
1 Memory and drum management
0 Processor allocation and
multiprogramming
Figure 1-29. (a) A type 1 hypervisor. (b) A pure type 2 hypervisor. (c) A practical type 2
hypervisor.
Figure 1-30. The process of compiling C and header files to make an executable.