1) What is the first step in problem-solving? A) Writing code B) Debugging C) Understanding the problem D) Optimizing the solution Answer: C 2) Which of these is not a step in the problem-solving process? A) Algorithm development B) Problem analysis C) Random guessing D) Testing and debugging Answer: C 3) What is an algorithm? A) A high-level programming language B) A step-by-step procedure to solve a problem C) A flowchart D) A data structure Answer: B 4) Which of these is the simplest data structure for representing a sequence of elements? A) Dictionary B) List C) Set D) Tuple Answer: B 5) What does a flowchart represent? A) Errors in a program B) A graphical representation of an algorithm C) The final solution to a problem D) A set of Python modules Answer: B 6) What is pseudocode? A) Code written in Python B) Fake code written for fun C) An informal high-level description of an algorithm D) A tool for testing code Answer: C 7) Which of the following tools is NOT commonly used in pr...
Direct Memory Access
* For devices that moves large quantities of data ( such as disk controllers ), it is wasteful to tie up the CPU transferring data in and out of registers one byte at a time.
* Instead this work can be off-loaded to a special processor, called as the Direct Memory Access, DMA, Controller.
* The host issues a command to the DMA controller, implicating the location where the data is located, the location where the data is to be moved to, and the number of bytes of data to moved. The DMA controller handles the data moved, and then interrupts the CPU when the transfer is complete.
* A simple DMA controller is a quality component in modern PCs, and many bus-
mastering I/O cards contain their possess DMA hardware.
* Handshaking between DMA controllers and their devices is fulfil by two wires called the DMA-request and DMA-acknowledge wires.
* While the DMA moves is going on the CPU does not have process to the PCI bus (including main memory ), but it does have process to its internal registers and primary and secondary caches.
* DMA can be complete in terms of either physical addresses or virtual addresses that are mapped to physical addresses. The latter method is known as Direct Virtual Memory Access, DVMA, and permits direct data transfer from one memory-mapped device to another without having the main memory chips.
* Direct DMA access by user processes can speed up operations, but is normally forbidden by modern systems for protection and security reasons. ( I.e. DMA is a kernel-mode operation. )
* Figure below shows the DMA process.