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
Trang 11 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
Trang 2system
Airline reservation
Operating system
Web browser
Application programs
Hardware
System programs
Command interpreter
Trang 3System 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.
Trang 4$JOB, 10,6610802, MARVIN TANENBAUM
Data for program
Fig 1-3 Structure of a typical FMS job.
Trang 5Job 3 Job 2 Job 1
Operating system
Memory partitions
Fig 1-4 A multiprogramming system with three jobs in memory.
Trang 6disk drive
Harddisk drive
Harddiskcontroller
Floppydiskcontroller
Keyboardcontroller
VideocontrollerMemory
CPU
Bus
Fig 1-5 Some of the components of a simple personal computer.
Trang 7Fetch unit
Fetch unit
Execute unit
Execute unit
Execute unit
Execute unit
Decode unit
Holding buffer
Fig 1-6 (a) A three-stage pipeline (b) A superscalar CPU.
Trang 8RegistersCacheMain memory
Magnetic tapeMagnetic disk
Typical capacityTypical access time
Fig 1-7 A typical memory hierarchy The numbers are very rough approximations.
Trang 9Surface 2
Surface 1
Surface 0
Read/write head (1 per surface)
Direction of arm motion Surface 3
Trang 10User program and data
User program and data
Operating System
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.
Trang 11CPU Interrupt
controller
Disk controller
Disk drive
Current instruction Next instruction
1 Interrupt
3 Return
2 Dispatch
to handler Interrupt handler
(b) (a)
Trang 12Modem
Mouse
PCIbridge
AvailablePCI slot
board
Key-itor
Mon-Graphicsadaptor
Trang 14(a) (b)
Fig 1-13 (a) A potential deadlock (b) An actual deadlock.
Trang 18User programcalling read
Trap to the kernelPut code for read in register
Increment SPCall readPush fdPush &bufferPush nbytes5
Fig 1-17 The 11 steps in making the system call
read(fd, buffer, nbytes).
Trang 19Fig 1-18 Some of the major POSIX system calls The return code
s is − 1 if an error has occurred The return codes are as follows:
pid is a process id, fd is a file descriptor, n is a byte count, position
is an offset within the file, and seconds is the elapsed time The
parameters are explained in the text.
Trang 20#define TRUE 1
while (TRUE) { /*repeat forever*/
type3prompt( ); /*display prompt on the screen*/
read3command(command, parameters); /*read input from terminal*/
if (fork( ) != 0) { /*fork off child process*/
Trang 21Address (hex) FFFF
0000
Stack
Data Text Gap
Fig 1-20 Processes have three segments: text, data, and stack.
Trang 22prog1
/usr/ast /usr/jim16
814070
mailgamestestnote
(b)
31705938
binmemof.c.prog1
Fig 1-21 (a) Two directories before linking /usr/jim/memo to
ast’s directory (b) The same directories after linking.
Trang 23(a) (b)bin dev lib mnt usr bin dev lib usr
Fig 1-22 (a) File system before the mount (b) File system after the mount.
Trang 24Fig 1-23 The Win32 API calls that roughly correspond to the
UNIX calls of Fig 1-18.
Trang 25Serviceprocedures
Utilityprocedures
Fig 1-24 A simple structuring model for a monolithic system.
Trang 27I/O instructions here
Trap here
Trap hereSystem calls hereVirtual 370s
Trang 28process
Client process
Process server
Terminal server
File server
Memory server Microkernel
User mode Kernel mode
Client obtains service by sending messages
to server processes
Fig 1-27 The client-server model.
Trang 29Machine 1 Machine 2 Machine 3 Machine 4 Client
Kernel
File server Kernel
Process server Kernel
Terminal server Kernel
Message from client to server
Network
Fig 1-28 The client-server model in a distributed system.