计算机组织与体系结构_计算机体系结构:输入/输出组织

计算机组织与体系结构

计算机体系结构:输入/输出组织 (Computer Architecture: Input/Output Organisation)

In this tutorial we will learn about how Input and Output is handled in a computer system.

在本教程中,我们将学习如何在计算机系统中处理输入和输出。

输入/输出子系统 (Input/Output Subsystem)

The I/O subsystem of a computer provides an efficient mode of communication between the central system and the outside environment. It handles all the input-output operations of the computer system.

计算机的I / O子系统在*系统和外部环境之间提供了一种有效的通信模式。 它处理计算机系统的所有输入输出操作。

外围设备 (Peripheral Devices)

Input or output devices that are connected to computer are called peripheral devices. These devices are designed to read information into or out of the memory unit upon command from the CPU and are considered to be the part of computer system. These devices are also called peripherals.

连接到计算机的输入或输出设备称为外围设备 。 这些设备被设计为根据来自CPU的命令将信息读取到存储单元中或从存储单元中读取信息,并被视为计算机系统的一部分。 这些设备也称为外围设备

For example: Keyboards, display units and printers are common peripheral devices.

例如: 键盘人机界面打印机是常见的外围设备。

There are three types of peripherals:

外围设备有三种类型:

  1. Input peripherals : Allows user input, from the outside world to the computer. Example: Keyboard, Mouse etc.输入外围设备 :允许用户从外界向计算机输入。 示例:键盘,鼠标等
  2. Output peripherals: Allows information output, from the computer to the outside world. Example: Printer, Monitor etc输出外围设备 :允许从计算机向外界输出信息。 示例:打印机,监视器等
  3. Input-Output peripherals: Allows both input(from outised world to computer) as well as, output(from computer to the outside world). Example: Touch screen etc.输入输出外围设备 :允许输入(从废弃世界到计算机)以及输出(从计算机到外部世界)。 示例:触摸屏等

介面 (Interfaces)

Interface is a shared boundary btween two separate components of the computer system which can be used to attach two or more components to the system for communication purposes.

接口是计算机系统的两个独立组件之间的共享边界,可用于将两个或多个组件连接到系统以进行通信。

There are two types of interface:

接口有两种:

  1. CPU Inteface

    CPU接口
  2. I/O Interface

    I / O介面

Let's understand the I/O Interface in details,

让我们详细了解I / O接口,



输入输出接口 (Input-Output Interface)

Peripherals connected to a computer need special communication links for interfacing with CPU. In computer system, there are special hardware components between the CPU and peripherals to control or manage the input-output transfers. These components are called input-output interface units because they provide communication links between processor bus and peripherals. They provide a method for transferring information between internal system and input-output devices.

连接到计算机的外围设备需要特殊的通信链接才能与CPU接口。 在计算机系统中,CPU和外围设备之间有特殊的硬件组件来控制或管理输入输出传输。 这些组件称为输入输出接口单元,因为它们提供了处理器总线和外围设备之间的通信链接。 它们提供了一种在内部系统和输入输出设备之间传递信息的方法。

I / O数据传输方式 (Modes of I/O Data Transfer)

Data transfer between the central unit and I/O devices can be handled in generally three types of modes which are given below:

*单元和I / O设备之间的数据传输通常可以通过以下三种类型的模式进行处理:

  1. Programmed I/O

    编程的I / O
  2. Interrupt Initiated I/O

    中断启动的I / O
  3. Direct Memory Access

    直接内存访问

编程的I / O (Programmed I/O)

Programmed I/O instructions are the result of I/O instructions written in computer program. Each data item transfer is initiated by the instruction in the program.

编程的I / O指令是用计算机程序编写的I / O指令的结果。 每次数据项传输均由程序中的指令启动。

Usually the program controls data transfer to and from CPU and peripheral. Transferring data under programmed I/O requires constant monitoring of the peripherals by the CPU.

通常,程序控制与CPU和外围设备之间的数据传输。 在已编程的I / O下传输数据需要CPU对外围设备进行持续监视。

中断启动的I / O (Interrupt Initiated I/O)

In the programmed I/O method the CPU stays in the program loop until the I/O unit indicates that it is ready for data transfer. This is time consuming process because it keeps the processor busy needlessly.

在已编程的I / O方法中,CPU停留在程序循环中,直到I / O单元指示已准备好进行数据传输为止。 这是耗时的过程,因为它使处理器不必要地忙碌。

This problem can be overcome by using interrupt initiated I/O. In this when the interface determines that the peripheral is ready for data transfer, it generates an interrupt. After receiving the interrupt signal, the CPU stops the task which it is processing and service the I/O transfer and then returns back to its previous processing task.

通过使用中断启动的I / O可以解决此问题。 这样,当接口确定外设已准备好进行数据传输时,它将生成一个中断。 在接收到中断信号后,CPU停止正在处理的任务并为I / O传输提供服务,然后返回其先前的处理任务。

直接内存访问 (Direct Memory Access)

Removing the CPU from the path and letting the peripheral device manage the memory buses directly would improve the speed of transfer. This technique is known as DMA.

从路径中卸下CPU并让外围设备直接管理内存总线将提高传输速度。 此技术称为DMA

In this, the interface transfer data to and from the memory through memory bus. A DMA controller manages to transfer data between peripherals and memory unit.

在这种情况下,接口通过内存总线在内存之间传输数据。 DMA控制器管理外设与存储单元之间的数据传输。

Many hardware systems use DMA such as disk drive controllers, graphic cards, network cards and sound cards etc. It is also used for intra chip data transfer in multicore processors. In DMA, CPU would initiate the transfer, do other operations while the transfer is in progress and receive an interrupt from the DMA controller when the transfer has been completed.

许多硬件系统都使用DMA,例如磁盘驱动器控制器,图形卡,网络卡和声卡等。它还用于多核处理器中的芯片内数据传输。 在DMA中,CPU将启动传输,在传输过程中执行其他操作,并在传输完成后从DMA控制器接收中断。

计算机组织与体系结构_计算机体系结构:输入/输出组织

Above figure shows block diagram of DMA

上图显示了DMA的框图

翻译自: https://www.studytonight.com/computer-architecture/input-output-organisation

计算机组织与体系结构