Open In App

Computer Organization | Asynchronous input output synchronization

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Share
Report issue
Report

Introduction :

Asynchronous input/output (I/O) synchronization is a technique used in computer organization to manage the transfer of data between the central processing unit (CPU) and external devices. In asynchronous I/O synchronization, data transfer occurs at an unpredictable rate, with no fixed timing or synchronization between the CPU and external devices.

This approach differs from synchronous I/O synchronization, which uses a clock signal to synchronize the transfer of data between the CPU and external devices, and ensures that data is transferred at a fixed rate.

Asynchronous I/O synchronization is typically used in situations where data transfer rates are variable or unpredictable, such as in serial communication or with slow devices. In these cases, the use of a clock signal to synchronize data transfer can result in a waste of resources or slow down the transfer of data.

To manage the transfer of data in asynchronous I/O synchronization, the CPU typically uses interrupt-driven I/O, where it waits for an interrupt signal from the device to indicate that data is ready for transfer. The CPU can then initiate the transfer of data, and the device will send data back in an asynchronous manner.

Asynchronous input output is a form of input output processing that allows others devices to do processing before the transmission or data transfer is done. Problem faced in asynchronous input output synchronization – It is not sure that the data on the data bus is fresh or not as their no time slot for sending or receiving data. This problem is solved by following mechanism:

  1. Strobe
  2. Handshaking

Data is transferred from source to destination through data bus in between. 1. Strobe Mechanism:

  1. Source initiated Strobe – When source initiates the process of data transfer. Strobe is just a signal. (i) First, source puts data on the data bus and ON the strobe signal. (ii) Destination on seeing the ON signal of strobe, read data from the data bus. (iii) After reading data from the data bus by destination, strobe gets OFF. Signals can be seen as: It shows that first data is put on the data bus and then strobe signal gets active.
  2. Destination initiated signal – When destination initiates the process of data transfer. (i) First, the destination ON the strobe signal to ensure the source to put the fresh data on the data bus. (ii) Source on seeing the ON signal puts fresh data on the data bus. (iii) Destination reads the data from the data bus and strobe gets OFF signal. Signals can be seen as: It shows that first strobe signal gets active then data is put on the data bus.

Problems faced in Strobe based asynchronous input output –

  1. In Source initiated Strobe, it is assumed that destination has read the data from the data bus but there is no surety.
  2. In Destination initiated Strobe, it is assumed that source has put the data on the data bus but there is no surety.

This problem is overcome by Handshaking. 2. Handshaking Mechanism:

  1. Source initiated Handshaking – When source initiates the data transfer process. It consists of signals: DATA VALID: if ON tells data on the data bus is valid otherwise invalid. DATA ACCEPTED: if ON tells data is accepted otherwise not accepted. (i) Source places data on the data bus and enable Data valid signal. (ii) Destination accepts data from the data bus and enable Data accepted signal. (iii) After this, disable Data valid signal means data on data bus is invalid now. (iv) Disable Data accepted signal and the process ends. Now there is surety that destination has read the data from the data bus through data accepted signal. Signals can be seen as: It shows that first data is put on the data bus then data valid signal gets active and then data accepted signal gets active. After accepting the data, first data valid signal gets off then data accepted signal gets off.
  2. Destination initiated Handshaking – When destination initiates the process of data transfer. REQUEST FOR DATA: if ON requests for putting data on the data bus. DATA VALID: if ON tells data is valid on the data bus otherwise invalid data. (i) When destination is ready to receive data, Request for Data signal gets activated. (ii) source in response puts data on the data bus and enabled Data valid signal. (iii) Destination then accepts data from the data bus and after accepting data, disabled Request for Data signal. (iv) At last, Data valid signal gets disabled means data on the data bus is no more valid data. Now there is surety that source has put the data on the data bus through data valid signal. Signals can be seen as: It shows that first Request for Data signal gets active then data is put on data bus then Data valid signal gets active. After reading data, first Request for Data signal gets off then Data valid signal.

 Features :

Callback functions: A callback function is a function that is called by the operating system or device driver when a data transfer operation is completed. The CPU can continue with other tasks while the device is performing the data transfer operation. Once the operation is complete, the device driver calls the callback function, which can be used to notify the CPU that the data transfer has finished.

Interrupts: Interrupts are signals sent by devices to the CPU to indicate that an event has occurred. In the case of asynchronous I/O, interrupts can be used to signal the CPU that a data transfer operation has completed. When an interrupt occurs, the CPU stops executing its current task and transfers control to an interrupt service routine (ISR) that is responsible for handling the interrupt.

Polling: Polling is a technique used to check the status of a device periodically to determine if it has completed a data transfer operation. With asynchronous I/O, the CPU can poll the device periodically to check if the data transfer has finished. If the transfer is complete, the CPU can then retrieve the data from the device.

Select function: The select function is a system call used to monitor multiple file descriptors for input or output readiness. With asynchronous I/O, the select function can be used to monitor the status of a device and notify the CPU when a data transfer operation has completed.

 Advantages of Asynchronous input output synchronization :

Some advantages of asynchronous input/output (I/O) synchronization include:

  1. Flexibility: Asynchronous I/O synchronization allows for flexible data transfer rates and can adapt to varying transfer speeds without the need for synchronization. This is particularly useful when dealing with slow or intermittent devices.
  2. Resource efficiency: Because data transfer is not synchronized to a clock signal, asynchronous I/O synchronization can be more resource-efficient than synchronous I/O synchronization. It can reduce the overhead of synchronization and improve the utilization of system resources.
  3. Reduced latency: Asynchronous I/O synchronization can help reduce latency, or the delay between the initiation of a data transfer and its completion. This can improve the responsiveness and overall performance of the system.
  4. Better error handling: Asynchronous I/O synchronization can provide better error handling, as it allows for the detection and handling of errors during data transfer. This can help ensure that data is transferred accurately and reliably.
  5. Compatibility: Asynchronous I/O synchronization is compatible with a wide range of devices and systems, making it a flexible and widely used technique for managing data transfer.

Dis-advantages of Asynchronous input output synchronization :

Some disadvantages of asynchronous input/output (I/O) synchronization include:

  1. Complexity: Asynchronous I/O synchronization can be more complex to implement than synchronous I/O synchronization, as it requires interrupt-driven I/O and other techniques to manage data transfer.
  2. Overhead: Asynchronous I/O synchronization can result in higher overhead than synchronous I/O synchronization, as the CPU must constantly monitor for interrupt signals and initiate data transfer when necessary.
  3. Latency: Although asynchronous I/O synchronization can help reduce latency in some cases, it can also introduce additional latency when waiting for interrupt signals from devices.
  4. Synchronization issues: Asynchronous I/O synchronization can introduce synchronization issues, particularly when dealing with multiple devices or large data transfers. It can be difficult to ensure that data is transferred in the correct order and that all devices are properly synchronized.
  5. Compatibility issues: Asynchronous I/O synchronization may not be compatible with all devices and systems, particularly those that require fixed data transfer rates or specific synchronization protocols.


Last Updated : 14 May, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads