Fetch-execute – What is the fetch-execution ? (Ch 7.4 p. 207)
|
The operation of every instruction is defined by its fetch-execute instruction cycle.Much procedure of the fetch-excute instruction cycle mainly comprises of copying data from one register to another.Every instruction must be fetched from memory before it can be excuted.Its working procedure is similar to that of Little Man.The working is as such:
i)The processor checks program counter which gives the address of the memory location of the command to be excuted.
ii)The processor fetches the command value from memory location.
iii)The command is decoded and excuted.
iv)Once this is done,the cycle is repeated until the program stops.
|
Stack - How the stack is permanently used through any subroutine call to better write code? (Ch 7.13 p. 221)
|
Stacks are an efficient eway of storing intermediate values during complex calculations.It is one of the most extensively used data storage structures in programming as it follows the Last In First Out(LIFO) structure.It is permanently used through any siubrioutine call to better write code as it uses LIFO structure which when a new data is be added it is stored sat the top of the stack and the pre exsisting data is pushed down to make room for new data.The data is also taken out or popped out from the top of stack which makes its very efficicent while performing any complex operation so that data can be stored temporarily and popped kout whenever needed as it remains on top of the stack.This makes performing subroutines very efficient and less time consuming.
|
(Englander et al. The architecture of computer hardware, systems software, & networking: an information technology approach 207)
|
I/O – Please list different types of Input/Output: Programmed I/O vs Interrupts and explain how they each work, as well as their advantages and disadvantages. (Ch 9.3)
|
Different types of Input/output are:
Keyboard,Mouse,Graphics display,Sound,Microphone,USB,TouchSCreen,Network,Printer,Flash Drive,Solid State drive,Magnetic Disk etc.
Programmed I/O:
Programmed I/O refers to data transfer to acess memory or registers on a device.It’s basic is to perform I/O operation when requested by the CPU.I/O module then sets status bits which is periodically checked by the CPU and it does not interrupt the CPU and also does not inform the CPU.The CPU may wait or comeback later.
Advantages:
i)The CPU is interrupted in between if it is performing so there is no delay in task.
Disadvantages:
i)The CPU has to wait for long the I/O module to perform and be rerady foer reception or Transmission of data.
ii)The performace of the entire system is severly degraded.
Interrupts:
Interrupt I/O is something similar to Programmed I/O technique.At this technique the processor do not wait for until the I/O operation is complete. Rather processor normally do the other task. When I/O is complete the I/O module interrupt into processor . Interrupt means that the operation is completed.
Advantages:
i)It is faster than the programmed I/O as entire system works faster and very efficitently as the CPU does not have to wait for long time.
Disadvantages:
i)The CPU is interrupted if it is performing some task which might not be good if it is working on processing some important tasks.
|
1](Englander et al. The architecture of computer hardware, systems software, & networking: an information technology approach 269-277)
2] Wong, AuthorLouie Y K. Louie Wong, 25 May 2017, www.louiewong.com/archives/137.
|
DMA - How Direct Memory Access works and when it is useful to use it? (Ch 9 p 268)
|
Direct Memory Access(DMA) isa method that allows an input/output device to send or receive data directly to or from the main memory,bypassing the CPU to speed up memory operations. First the CPU programs the DMA controller by setting its registers so it knows what to transfer where.It also issues a command to the disk controller telling it to read data from the disk into its internal buffer
When valid data are in the disk controller’s buffer, DMA can begin. The DMA controller initiates the transfer by issuing a read request over the bus to the disk controller. The write to memory is another cycle.When the write is complete, the disk controller sends an acknowledgement signal to the DMA controller, also over the bus .At that time, the DMA controller interrupts the CPU to let it know that the transfer is now complete.
This feature is useful to use whenever the CPU is busy with some high priority or more important that it does have the time to perform I/O operation or when the CPU needs to perform work while having relatively slow I/O data transfer.
|
1](Englander et al. The architecture of computer hardware, systems software, & networking: an information technology approach 286-288)
2] Techopedia. “What Is Direct Memory Access (DMA)? - Definition from Techopedia.” Techopedia.com, Techopedia, 24 July 2011, www.techopedia.com/definition/2767/direct-memory-access-dma.
|