上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec24_Review

OPERATING SYSTEMS 1 龚玲 lgong@sjtu.edu.cn
OPERATING SYSTEMS 龚玲 lgong@sjtu.edu.cn 1

INTRO TO JAVA o Java programming language o The one we use to write our program o general-purpose o concurrent o class-based o object-oriented o Compiled to byte code of JVM
INTRO TO JAVA Java programming language The one we use to write our program general-purpose concurrent class-based object-oriented Compiled to byte code of JVM

JAVA IS PORTABLE, As long as there is a JVM compiled for that particular processor and OS Typical program,like C or C++,is compiled for a particular processor architecture and OS. ● “Write once,run everywhere!” 0 Sun's motto for Java
JAVA IS PORTABLE, As long as there is a JVM compiled for that particular processor and OS Typical program, like C or C++, is compiled for a particular processor architecture and OS. “Write once, run everywhere!” Sun’s motto for Java

FOUR COMPONENTS OF A COMPUTER SYSTEM user user user user 1 2 3 n compiler assembler text editor database system system and application programs operating system computer hardware
FOUR COMPONENTS OF A COMPUTER SYSTEM

COMPUTER SYSTEM STRUCTURE o Computer system can be divided into four components Hardware-provides basic computing resources o CPU,memory,I/O devices ·Operating system o Controls and coordinates use of hardware among various applications and users Application programs-define the ways in which the system resources are used to solve the computing problems of the users o Word processors,compilers,web browsers,database systems,video games ·Users o People,machines,other computers
COMPUTER SYSTEM STRUCTURE Computer system can be divided into four components Hardware – provides basic computing resources CPU, memory, I/O devices Operating system Controls and coordinates use of hardware among various applications and users Application programs – define the ways in which the system resources are used to solve the computing problems of the users Word processors, compilers, web browsers, database systems, video games Users People, machines, other computers

OPERATING SYSTEM SERVICES o One set of operating-system services provides functions that are helpful to the user: User interface-Almost all operating systems have a user interface UI) o Varies between Command-Line (CLI),Graphics User Interface (GUI),Batch Program execution-The system must be able to load a program into memory and to run that program,end execution,either normally or abnormally (indicating error) 1/O operations-A running program may require I/O,which may involve a file or an I/O device. File-system manipulation-The file system is of particular interest. Obviously,programs need to read and write files and directories, create and delete them,search them,list file Information,permission management
OPERATING SYSTEM SERVICES One set of operating-system services provides functions that are helpful to the user: User interface - Almost all operating systems have a user interface (UI) Varies between Command-Line (CLI), Graphics User Interface (GUI), Batch Program execution - The system must be able to load a program into memory and to 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. File-system manipulation - The file system is of particular interest. Obviously, programs need to read and write files and directories, create and delete them, search them, list file Information, permission management

COMPUTER-SYSTEM OPERATION o I/O devices and the CPU can execute concurrently. o Each device controller is in charge of a particular device type. o Each device controller has a local buffer. o CPU moves data from/to main memory to/from local buffers o I/O is from the device to local buffer of controller. o Device controller informs CPU that it has finished its operation by causing an interrupt
COMPUTER-SYSTEM OPERATION I/O devices and the CPU can execute concurrently. Each device controller is in charge of a particular device type. Each device controller has a local buffer. CPU moves data from/to main memory to/from local buffers I/O is from the device to local buffer of controller. Device controller informs CPU that it has finished its operation by causing an interrupt

INTERRUPT TIMELINE CPU user process executing I/O interrupt processing l/o idle device transferring 1/o transfer 1/O transfer request done request done
INTERRUPT TIMELINE

COMMON FUNCTIONS OF INTERRUPTS o Interrupt transfers control to the interrupt service routine generally,through the interrupt vector, which contains the addresses of all the service routines. o Interrupt architecture must save the address of the interrupted instruction. o Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt. o A trap is a software-generated interrupt caused either by an error or a user request. o An operating system is interrupt driven
COMMON FUNCTIONS OF INTERRUPTS Interrupt transfers control to the interrupt service routine generally, through the interrupt vector, which contains the addresses of all the service routines. Interrupt architecture must save the address of the interrupted instruction. Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt. A trap is a software-generated interrupt caused either by an error or a user request. An operating system is interrupt driven

INTERRUPT HANDLING o The operating system preserves the state of the CPU by storing registers and the program counter. o Determines which type of interrupt has occurred: ·polling vectored interrupt system o Separate segments of code determine what action should be taken for each type of interrupt
INTERRUPT HANDLING The operating system preserves the state of the CPU by storing registers and the program counter. Determines which type of interrupt has occurred: polling vectored interrupt system Separate segments of code determine what action should be taken for each type of interrupt
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec24_DISK MANAGEMENT AND I/O.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec23_file system implementation.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec22_file system implementation.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec21_file system interface.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec20_virtual memory.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec19_virtual memory.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec18_mainmemory.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec17_mainmemory.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec16_mainmemory.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Introduction_Lec3.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Introduction_Lec2.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Introduction_Lec1.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-deadlock_Lec15.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-cpuscheduling_Lec11.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-cpuscheduling_Lec10.pdf
- 上海交通大学:《C++程序设计与实践》课程教学资源(课件讲稿)第2讲 C++语言的基本数据类型与表达式.pdf
- 上海交通大学:《C++程序设计与实践》课程教学资源(课件讲稿)第1讲 绪论.pdf
- 上海交通大学:《面向对象软件工程 Software Engineering》课程教学资源《面向对象软件工程实践指南》教材资料(WORD版).docx
- 上海交通大学:《面向对象软件工程 Software Engineering》课程教学资源(作业)面向对象软件工程实践指南-2.pdf
- 上海交通大学:《面向对象软件工程 Software Engineering》课程教学资源(作业)小组作业5-最终交付.docx
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Process Synchronization_Lec12.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Process Synchronization_Lec13.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Process Synchronization_Lec14.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-process_Lec4.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-process_Lec5.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-process_Lec6.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-process_Lec7.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-process_Lec8.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-semaphore EXERCISES.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-OPERATING SYSTEMS(LINUX SYSTEM CALLS).pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-thread.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)Java Introduction.docx
- 上海交通大学:《操作系统 Operating System》课程教学资料(JAVA PPT)lec1.ppt
- 上海交通大学:《操作系统 Operating System》课程教学资料(JAVA PPT)lec2.ppt
- 上海交通大学:《操作系统 Operating System》课程教学资料(JAVA PPT)lec3.ppt
- 上海交通大学:《操作系统 Operating System》课程教学资料(JAVA PPT)lec4.ppt
- 上海交通大学:《操作系统 Operating System》课程教学资料(JAVA PPT)lec5.ppt
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)Java Primer.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)Java多线程应用实例(制作烟花效果).doc
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)Java多线程编程.pdf