您现在的位置:学赛首页 > IT英语 > 硬件数码 > 正文
计算机输入输出系统(二)
http://www.educity.cn 作者:希赛 来源:希赛网 2006年8月9日 发表评论 进入社区

  Memory-Mapped I/O

  Memory-Mapped I/O is another form of programmed I/O that maps the device connections to bits in memory address space,as shown in Fig. 1-13.[5]  An output command is a normal store instruction that stores a pattern of bits into a designated memory location.[6] An input command is a normal load instruction that reads a memory location.

  Memory-mapped I/O requires the full participation of the processor,as with programmed I/O. Thus there is a similar loss of efficiency that is due to executing the I/O control program.
  The Intel Pentium Pro supports memory-mapped I/O in addition to proizrammed I/O.Any of the processor’s instructions that reference memory can address memory-mapped I/O locations. An example of an allocation is shown in Fig. 1-14.

  The move instruction can transfer data between any of the processor’s registers and the spaces in memory allocated for I/O.Other operations such as ADD,AND,OR,and test can also have one source argument in I/O space.The logical operations are useful for control of bits in the control and status registers of an I/O device that is mapped into one or more of the memory-address spaces.[7]

  Interrupt I/O

  Because of the low efficiency of pure programmed or memory-mapped I/O in high-performance system,so interrupt is produced.Early mainframe computers,such as the Univac 1103 and the IBM 701,were users of this technique.
The data connection between the I/O device and the processor memory is shown in Fig.1-15 as a memory-mapped system.The processor sends a command to the device,usually by means of a special programmed I/O register,to start its operation.After the request is made to the device,the processor returns to the main program.When the latency is satisfied and the device is ready to transfer,the device sends an interrupt signal to the processor and the processor services the interrupt and performs the data transfer.Various status reports are sent from the device to the processor by means of the programmed I/O paths.

  Interrupt I/O can be used with both programmed and memory-mapped I/O;the Intel Pentium Pro implements both techniques.

  存储器映射I/O

  存储器映射I/O是另一种程序控制I/O,它把I/O设备连接映射成存储器地址空间中的位组,如图1-13所示。输出命令是一条普通的存储指令,把位模式存入指定的存储单元中。输入命令是一条普通的从指定存储单元读取数据的指令。
     像程序控制I/O一样,存储器映射I/O也要求处理器全面参与。由于要执行I/O控制程序,故效率同样降低。
     Intel Pentium Pro在支持程序控制I/O的同时,也支持存储器映射I/O。任何访问内存的处理器指令都能访问存储器映射I/O地址。图1-14为地址分配的例子。传送指令可以在任何处理器、寄存器和为I/O分配的内存空间之间传送数据。其他操作如“加(ADD)”、“与(AND)”、“或(OR)”以及测试,也可以有一个I/O空间的源参量。逻辑操作常用于对I/O设备中的控件和状态寄存器的位进行控制,而每一设备都可以映射为1个或多个存储器地址空间。

   中断I/O

  由于对高性能系统来说纯程序控制I/O或存储器映射I/O的效率都很低,所以又出现了中断方式。早期的大型计算机,如Univac 1103,IBM 701都采用中断技术。
     图1-15展示了I/O设备和处理器存储器之间的数据连接,这是一个存储器映射系统。处理器通常使用专用的程序控制I/O寄存器向设备发送一个启动设备操作的命令。在向设备发出请求之后,处理器返回到主程序上。当等待时间满足要求并且设备做好传送准备时,它向处理器发送一个中断信号,处理器进行中断服务并完成数据传送。借助程序控制I/O通道,从设备向处理器送出各种状态报告。
     中断I/O可以与程序控制I/O和存储器映射I/O一起使用;Inter Pentium Pro就采用了这两种技术。