Interrupt Time Line For a Single Process Doing Output 单进程处理输出的中断时间线 CPU UsE proceaR erecting vO inte nup processing idle dace berberin banse ganshu reqest dce request done Applied Operating System Concepts 2.6
Applied Operating System Concepts 2.6 Interrupt Time Line For a Single Process Doing Output 单进程处理输出的中断时间线
lo Structure JO结构 After l/O starts, control returns to user program only upon l/O completion 在ⅣO开始之后,仅当O完成之后控制才返回用户程序 wait instruction idles the CPU until the next interrupt 等待指令空转cPU直至下一个中断 wait loop( contention for memory access)等候循环 At most one I/o request is outstanding at a time, no simultaneous I/o processing每一时刻最多一个O请求,无并行o处理 After lo starts, control returns to user program, without waiting for I/o completion.在O开始之后,不等O完成控制就返回用户程序 System call- request to the operating system to allow user to wait for o completion系统调用-请求操作系统允许用户等待lO完成 Device-status table contains entry for each l/o device indicating its type, address, and state设备状态表包括每个o设备的类型、地址和状态 Operating system indexes into o device table to determine device status and to modify table entry to include interrupt操作系统引用设备 状态表以确定设备状态并修改表入口加入中断 Applied Operating System Concepts 2.7
Applied Operating System Concepts 2.7 I/O Structure I/O结构 • After I/O starts, control returns to user program only upon I/O completion. 在I/O开始之后,仅当I/O完成之后控制才返回用户程序 – wait instruction idles the CPU until the next interrupt 等待指令空转CPU直至下一个中断 – wait loop (contention for memory access).等候循环 – At most one I/O request is outstanding at a time, no simultaneous I/O processing.每一时刻最多一个I/O请求,无并行I/O处理 • After I/O starts, control returns to user program, without waiting for I/O completion. 在I/O开始之后,不等I/O完成控制就返回用户程序 – System call – request to the operating system to allow user to wait for I/O completion.系统调用-请求操作系统允许用户等待I/O完成 – Device-status table contains entry for each I/O device indicating its type, address, and state.设备状态表包括每个I/O设备的类型、地址和状态 – Operating system indexes into I/O device table to determine device status and to modify table entry to include interrupt.操作系统引用设备 状态表以确定设备状态并修改表入口加入中断
Two l/o methods 两种JO方法 Synchronous Asynchronous 同步 异步 LeeI requesting process watng requesting pocess cdce dhet drice diet kerel interupt hander I interupt hender ferrel hardware hardwate data tansfer dsta tartet Ime tme Applied Operating System Concepts 2.8
Applied Operating System Concepts 2.8 Two I/O methods 两种I/O方法 Synchronous 同步 Asynchronous 异步