Answer:
Explanation:
a. To initiate a DMA transfer, the CPU first sets up the DMA registers, which contain a pointer to the source of a transfer, a pointer to the destination of the transfer, and a counter of the number of bytes to be transferred. Then the DMA controller proceeds to place addresses on the bus to perform transfers, while the CPU is available to accomplish other work.
b. Once the entire transfer is finished, the DMA controller interrupts the CPU.
c. Both the CPU and the DMA controller are bus masters. A problem would be created if both the
CPU and the DMA controller want to access the memory at the same time. Accordingly, the CPU should be momentarily prevented from accessing main memory when the DMA controller seizes the memory bus. However, if the CPU is still allowed to access data in its primary and secondary caches, a coherency issue may be created if both the CPU and the DMA controller update the same memory locations.
Answer:
The answer to this question is option "b".
Explanation:
In the method definition, we perform swapping. To perform swapping we define a variable "temp" that swap values of variable p1 and p2 and store in array that is "values". and other options are not correct that can be defined as:
- In option a, It does not insert any new value in array because we do not pass any value in function.
- In option c, The function does not copy and assign a value in a new array because in this function we not assign any new array.
- In option d, It is incorrect because it can not move an element into high index position.
I am sorry. I cannot see the options...