0

I was studying the I/O process of a PC...and I think I understood it..but not very much so I will type what I understood giving an example..and I hope that I got it right

e.g. typing with a keyboard

First: The Input, and that is done simply by the keyboard..

Second: The information gets to the CPU in binary, but the logic unit doesn't understand it so the Control Unit gets the Instructions saved in the RAM by the CU it self.. then the instructions is sent to the Logic Unit through the CU

Finally:The Logic Unit understands it that time and do some operations that produces some Outputs. The outputs are saved in the RAM, and viewed on the screen

So, please tell me if that's right or if I missed the whole thing.. Thank you very much in advance.

Raphael
  • 73,212
  • 30
  • 182
  • 400

2 Answers2

1

From what I know, and I might be slightly wrong here, each device (Mouse, keyboard, screen etc') has a device driver.

The device driver is the one handling the communications with the CPU. Where usually, each device has its own Data register, Status register and Command register (Where the register are basically mapped areas in memory for the device itself).

What happens is when any action is made (i.e pressing a key on the keyboard) the device "updates its status" to ready to send and stores the data it needs to send in some area of memory specifically saved for it, and then interrupts the CPU to perform the action needed.

The CPU sends "Ack" as acknowledgement and accepts the interrupt, executes it, and goes back to what it did before. (Only if the status is ready, otherwise does nothing).

(There are other methods such as busy wait that the device can notify and interact with the CPU).

Zionsof
  • 151
  • 2
0

An easy way to facilitate understanding the working of a CPU is using the Little Man Computer which provides a visual representation of how instructions are processed to manipulate data. You can find it here http://peterhigginson.co.uk/LMC it may be useful to go through the help section to facilitate understanding. Note that this is a simple model. Good luck.

TMN
  • 1