PrepAway - Latest Free Exam Questions & Answers

Which of the following is used when the CPU sends data to an I/O device and then works on another process̵

There are different ways that operating systems can carry out software I/O procedures. Which of the following is used when the CPU sends data to an I/O device and then works on another process’s request until the I/O device is ready for more data?

PrepAway - Latest Free Exam Questions & Answers

A.
I/O using DMA

B.
Interrupt-driven I/O

C.
Programmable I/O

D.
Premapped I/O

Explanation:
B: If an operating system is using interrupt-driven I/O (input/output), this means that the CPU sends data to an I/O device and then goes and works on another
process’ request. When the I/O device is ready for more data, it sends an interrupt to the CPU. The CPU stops what it is doing, sends more data, and moves to another
job. This process (send datago, do something elseinterruptsend data) continues until the process is complete.
A is incorrect because direct memory access (DMA) is a way of transferring data between I/O devices and the system’s memory without using the CPU. This speeds
up data transfer rates significantly. When used in I/O activities, the DMA controller feeds data to the I/O device without bothering the CPU. This method is sometimes
referred to as unmapped I/O.
C is incorrect because if an operating system is using programmable I/O, this means that the CPU sends data to an I/O device and polls the device to see if it is ready
to accept more data. If the device is not ready to accept more data, the CPU wastes time by waiting for the device to become ready. For example, the CPU would send
a byte of data (a character) to the printer and then ask the printer if it is ready for another byte. The CPU sends the text to be printed one byte at a time. This is a very
slow way of working and wastes precious CPU time.
D is incorrect because in a premapped I/O system, the CPU sends the physical memory address of the requesting process to the I/O device, and the I/O device is
trusted enough to interact with the contents of memory directly. So the CPU does not control the interactions between the I/O device and memory. The operating system
trusts the device to behave properly. Thus, premapped I/O does not pertain to performance, as do other methods, but provides an approach that can directly affect
security. Fully mapped I/O also affects security. However, in this case, the operating system does not fully trust the I/O device. The physical address is not given to the
I/O device. Instead, the device works purely with logical addresses and works on behalf (under the security context) of the requesting process. So the operating system
does not trust the device to interact with memory directly. The operating system does not trust the process or device and acts as the broker to control how they
communicate with each other.

2 Comments on “Which of the following is used when the CPU sends data to an I/O device and then works on another process&#821

  1. joe says:

    Operating system is using interrupt-driven I/O (input/output), this means that the CPU sends data to an I/O device and then goes and works on another
    process’ request.

    Direct memory access (DMA) is a way of transferring data between I/O devices and the system’s memory without using the CPU.

    Using programmable I/O, this means that the CPU sends data to an I/O device and polls the device to see if it is ready to accept more data.

    Premapped I/O system, the CPU sends the physical memory address of the requesting process to the I/O device, and the I/O device is trusted enough to interact with the contents of memory directly.




    0



    0

Leave a Reply