OPERATING SYSTEM CONCEPTS 操作系统概念 ●●●●● 张柏礼 baileyzhang@sohu.com 东南大学计算机学院
1 OPERATING SYSTEM CONCEPTS 张 柏 礼 bailey_zhang@sohu.com 东南大学计算机学院 操作系统概念
●●● ●●●● 2. Operating-System Structures ●●●● Objectives To describe the services that an operating system provides to users, processes, and other systems o To discuss the various ways of structuring an operating system To explain how operating systems are installed and customized and how they boot
2 2. Operating-System Structures ⚫ Objectives ⚫ To describe the services that an operating system provides to users, processes, and other systems ⚫ To discuss the various ways of structuring an operating system ⚫ To explain how operating systems are installed and customized and how they boot
●●● ●●●● 2.Operating-System Structures 9908 ●●●● 2.1 Operating System Services 2.2 User Operating System Interface 2. 3 System Calls 2. 4 Types of System Calls ·24 System Programs 2.6 Operating System Design and Implementation 2.7 Operating System Structure ●28 Virtual machines 2.9 Operating System Generation 2.10 System Boot
3 2. Operating-System Structures ⚫ 2.1 Operating System Services ⚫ 2.2 User Operating System Interface ⚫ 2.3 System Calls ⚫ 2.4 Types of System Calls ⚫ 2.4 System Programs ⚫ 2.6 Operating System Design and Implementation ⚫ 2.7 Operating System Structure ⚫ 2.8 Virtual Machines ⚫ 2.9 Operating System Generation ⚫ 2.10 System Boot
●●● ●●●● 2.1 Operating System Services ●●●● ●●● ●●● ●●●● o Generally operating-system should provide one set of common services( that are helpful to the user o User interface(Ul) Almost all operating systems have a user interface Command-Line interface(CLI) o Graphics User Interface(GUI Batch Interface Commands and directives are entered into files, and those files are executed
4 2.1 Operating System Services ⚫ Generally operating-system should provide one set of common services (that are helpful to the user) ⚫ User interface (UI) Almost all operating systems have a user interface ⚫ Command-Line interface (CLI) ⚫ Graphics User Interface (GUI) ⚫ Batch Interface ▪ Commands and directives are entered into files, and those files are executed
●●● ●●●● 2.1 Operating System Services :: ●● ●●●● ● Program execution The system must be able to load a program into memory run that program end execution, either normally or abnormally 〔 indicating error) 10 operations o A running program may require O, which may involve a file or an o device o The operating system must provide a means to operate l/o
5 2.1 Operating System Services ⚫ Program execution ⚫ The system must be able to ▪ load a program into memory ▪ run that program ▪ end execution, either normally or abnormally (indicating error) ⚫ I/O operations ⚫ A running program may require I/O, which may involve a file or an I/O device ⚫ The operating system must provide a means to operate I/O
●●● ●●●● 2.1 Operating System Services :9 s ●● ●●●● File-system manipulation o read and write files and directories create and delete search permission management Communications o Processes may exchange information on the same com puteror between com puters over a network Communications may be via shared memory or through message passing(packets moved by the os)
6 2.1 Operating System Services ⚫ File-system manipulation ⚫ read and write files and directories ⚫ create and delete ⚫ search ⚫ List ⚫ permission management ⚫ Communications ⚫ Processes may exchange information, on the same computer or between computers over a network ⚫ Communications may be via shared memory or through message passing (packets moved by the OS)
●●● ●●●● 2.1 Operating System Services :9 s ● ●●●● ● Error detection os needs to be constantly aware of possible errors Errors may occur in the CPU and memory hardware, in 1/o devices, in user program o For each type of error, os should take the appropriate action to ensure correct and consistent computing o Debugging facilities can greatly enhance the user's and programmer's abilities to efficiently use the system
7 2.1 Operating System Services ⚫ Error detection ⚫ OS needs to be constantly aware of possible errors ▪ Errors may occur in the CPU and memory hardware, in I/O devices, in user program ⚫ For each type of error, OS should take the appropriate action to ensure correct and consistent computing ⚫ Debugging facilities can greatly enhance the user’s and programmer’s abilities to efficiently use the system
●●● ●●●● 2.1 Operating System Services :: ● ●●●● · Operating-system provide another set of° common services that are helpful to ensuring the efficient operation of the system itself Resource allocation o When multiple users or multiple jobs running concurrently o Resources must be allocated to each of them Some may have special allocation code such as CPU cycles(process-scheduling), main memory, and file storage others may have general request and release code such as l/o devices
8 2.1 Operating System Services ⚫ Operating-system provide another set of common services (that are helpful to ensuring the efficient operation of the system itself ) ⚫ Resource allocation ⚫ When multiple users or multiple jobs running concurrently ⚫ Resources must be allocated to each of them ▪ Some may have special allocation code ▪ such as CPU cycles (process-scheduling), main memory, and file storage ▪ others may have general request and release code ▪ such as I/O devices
●●● ●●●● 2.1 Operating System Services :: ● ●●●● Accounting(登账) To keep track of which users use how much and what kinds of computer resources o Protection and security o Protection involves ensuring that all access to system resources is controlled o security requires user to authenticate himself to the system, extends to defending external l /O devices from invalid access attempts
9 2.1 Operating System Services ⚫ Accounting (登账) ⚫ To keep track of which users use how much and what kinds of computer resources ⚫ Protection and security ⚫ Protection involves ensuring that all access to system resources is controlled ⚫ Security requires user to authenticate himself to the system, extends to defending external I/O devices from invalid access attempts
●●● ●●●● 2.1 Operating System Services :: ● ●●●● user and other system programs GUI batch command line user interfaces system calls program esource execution rations systems communication allocation accounting error protection detection and services security operating syster hardware
10 2.1 Operating System Services