中国高校课件下载中心 》 教学资源 》 大学文库

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

文档信息
资源类别:文库
文档格式:PDF
文档页数:266
文件大小:3.31MB
团购合买:点击进入团购
内容简介
上海交通大学:《操作系统 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

刷新页面下载完整文档
VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
相关文档