A computer system consists of hardware, system programs, and application programs figs 1

30 388 0
A computer system consists of hardware, system programs, and application programs figs 1

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

HISTORY OF WINDOWS 2000 11.2 PROGRAMMING WINDOWS 2000 11.3 SYSTEM STRUCTURE 11.4 PROCESSES AND THREADS IN WINDOWS 2000 11.5 MEMORY MANAGEMENT 11.6 INPUT/OUTPUT IN WINDOWS 2000 11.7 THE WINDOWS 2000 FILE SYSTEM 11.8 SECURITY IN WINDOWS 2000 11.9 CACHING IN WINDOWS 2000 11.10 SUMMARY

1 INTRODUCTION 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 1.8 RESEARCH ON OPERATING SYSTEMS 1.9 OUTLINE OF THE REST OF THIS BOOK 1.10 METRIC UNITS 1.11 SUMMARY Banking system Airline reservation Operating system Web browser Compilers Editors Application programs Hardware System programs Command interpreter Machine language Microarchitecture Physical devices Fig. 1-1. A computer system consists of hardware, system pro- grams, and application programs. 1401 7094 1401 (a) (b) (c) (d) (e) (f) Card reader Tape drive Input tape Output tape System tape Printer Fig. 1-2. An early batch system. (a) Programmers bring cards to 1401. (b) 1401 reads batch of jobs onto tape. (c) Operator carries input tape to 7094. (d) 7094 does computing. (e) Operator carries output tape to 1401. (f) 1401 prints output. $JOB, 10,6610802, MARVIN TANENBAUM $FORTRAN $LOAD $RUN $END Fortran program Data for program Fig. 1-3. Structure of a typical FMS job. Job 3 Job 2 Job 1 Operating system Memory partitions Fig. 1-4. A multiprogramming system with three jobs in memory. Monitor Keyboard Floppy disk drive Hard disk drive Hard disk controller Floppy disk controller Keyboard controller Video controller MemoryCPU Bus Fig. 1-5. Some of the components of a simple personal computer. Fetch unit Fetch unit Fetch unit Decode unit Decode unit Execute unit Execute unit Execute unit Execute unit Decode unit Holding buffer (a) (b) Fig. 1-6. (a) A three-stage pipeline. (b) A superscalar CPU. Registers Cache Main memory Magnetic tape Magnetic disk 1 nsec 2 nsec 10 nsec 10 msec 100 sec <1 KB 1 MB 64-512 MB 5-50 GB 20-100 GB Typical capacityTypical access time Fig. 1-7. A typical memory hierarchy. The numbers are very rough approximations. Surface 2 Surface 1 Surface 0 Read/write head (1 per surface) Direction of arm motion Surface 3 Surface 5 Surface 4 Surface 7 Surface 6 Fig. 1-8. Structure of a disk drive. User program and data User program and data Operating System Address 0xFFFFFFFF Limit Base 0 (a) User-2 data User-1 data User program Operating System Base-2 Limit-2 Limit-2 Limit-1 Base-2 Base-1 (b) Limit-1 Base-1 Registers when program 1 is running Registers when program 2 is running Fig. 1-9. (a) Use of one base-limit pair. The program can access memory between the base and the limit. (b) Use of two base-limit pairs. The program code is between Base-1 and Limit-1 whereas the data are between Base-2 and Limit-2. [...]... Keyboard ISA bus Sound card Printer Fig 1- 11 The structure of a large Pentium system Available ISA slot A B D E C F Fig 1- 12 A process tree Process A created two child processes, B and C Process B created three child processes, D, E, and F (a) (b) Fig 1- 13 (a) A potential deadlock (b) An actual deadlock Root directory Students Robbert Matty Faculty Leo Prof.Brown Courses CS1 01 Papers CS105 Prof.Green... code for read in register 10 4 User space Increment SP Call read 3 Push fd 2 Push &buffer 1 Push nbytes 11 User program calling read 6 Kernel space (Operating system) Dispatch 9 7 8 Sys call handler 0 Fig 1- 17 The 11 steps in making the system call read(fd, buffer, nbytes) Library procedure read Process management Call pid = fork( ) pid = waitpid(pid, &statloc, options) s = execve(name, argv, environp)... or both Close an open file Read data from a file into a buffer Write data from a buffer into a file Move the file pointer Get a file’s status information Directory and file system management Call Description s = mkdir(name, mode) Create a new directory s = rmdir(name) Remove an empty directory s = link(name1, name2) Create a new entry, name2, pointing to name1 s = unlink(name) Remove a directory entry... Return 1 Interrupt 1 2 Dispatch to handler (a) Interrupt handler (b) Fig 1- 10 (a) The steps in starting an I/O device and getting an interrupt (b) Interrupt processing involves taking the interrupt, running the interrupt handler, and returning to the user program Cache bus Level 2 cache Memory bus Local bus PCI bridge CPU Main memory PCI bus SCSI USB ISA bridge IDE disk Graphics adaptor Available PCI... fork off child process */ /* Parent code */ waitpid( 1, &status, 0); /* wait for child to exit */ } else { /* Child code */ execve(command, parameters, 0); /* execute command */ } } Fig 1- 19 A stripped-down shell Throughout this book, TRUE is assumed to be defined as 1 Address (hex) FFFF ;; ; Stack Gap Data Text 0000 Fig 1- 20 Processes have three segments: text, data, and stack /usr/ast /usr/jim 31. .. signals Get the current time Fig 1- 23 The Win32 API calls that roughly correspond to the UNIX calls of Fig 1- 18 Main procedure Service procedures Utility procedures Fig 1- 24 A simple structuring model for a monolithic system Layer 5 4 3 2 1 0 Function The operator User programs Input/output management Operator-process communication Memory and drum management Processor allocation and multiprogramming... 0.00000000000000000000000 01 Prefix milli micro nano pico femto atto zepto yocto Exp Explicit 10 3 1, 000 6 10 1, 000,000 10 9 1, 000,000,000 10 12 1, 000,000,000,000 10 15 1, 000,000,000,000,000 10 18 1, 000,000,000,000,000,000 10 21 1,000,000,000,000,000,000,000 10 24 1, 000,000,000,000,000,000,000,000 Fig 1- 29 The principal metric prefixes Prefix Kilo Mega Giga Tera Peta Exa Zetta Yotta ... mount(special, name, flag) Mount a file system s = umount(special) Unmount a file system Miscellaneous Call s = chdir(dirname) s = chmod(name, mode) s = kill(pid, signal) seconds = time(&seconds) Description Change the working directory Change a file’s protection bits Send a signal to a process Get the elapsed time since Jan 1, 19 70 Fig 1- 18 Some of the major POSIX system calls The return code s is 1 if an... Prof.Green Grants Prof.White Committees SOSP Files Fig 1- 14 A file system for a university department COST -11 Root a c Floppy b x d y a c (a) d b x y (b) Fig 1- 15 (a) Before mounting, the files on drive 0 are not accessible (b) After mounting, they are part of the file hierarchy Process Process Pipe A Fig 1- 16 Two processes connected by a pipe B Address 0xFFFFFFFF Return to caller Trap to the kernel... model User mode Machine 1 Machine 2 Machine 3 Machine 4 Client File server Process server Terminal server Kernel Kernel Kernel Kernel Network Message from client to server Fig 1- 28 The client-server model in a distributed system Exp 10 −3 10 −6 10 −9 10 12 10 15 10 18 10 − 21 10−24 Explicit 0.0 01 0.0000 01 0.0000000 01 0.0000000000 01 0.0000000000000 01 0.00000000000000000 01 0.00000000000000000000 01 0.0000000000000000000000001 . programs Hardware System programs Command interpreter Machine language Microarchitecture Physical devices Fig. 1-1. A computer system consists of hardware, system pro- grams, and application programs. 1401. Surface 3 Surface 5 Surface 4 Surface 7 Surface 6 Fig. 1-8. Structure of a disk drive. User program and data User program and data Operating System Address 0xFFFFFFFF Limit Base 0 (a) User-2 data User-1. Use of one base-limit pair. The program can access memory between the base and the limit. (b) Use of two base-limit pairs. The program code is between Base-1 and Limit-1 whereas the data are

Ngày đăng: 28/04/2014, 16:35

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan