|
|
||
| You are here: | ||
|
6.5
These terms are discussed in more detail further down the page.
If it helps, imagine a water main serving a group of houses - it supplies water at high pressure and high volume. If you tried to connect to the main directly your pipes would probably burst or the jet would come out so fast it would slice you in half. So the water is transferred first to another container (your roof tank) before passing on to the tap. Roof tank = buffer. If it doesn't help, oh well, I gave it a shot :)
Network printer servers are also quite often dedicated pieces of hardware or even built into the printer itself. If your word processor took as long to save a document as it did to print, you'd buy yourself another system.
|
on this page: [ definitions | control | DMA, interrupts and polling | serial/parallel comms ] A port is a hardware interface that allows a peripheral to be connected to a computer - eg mouse port, printer port. Handshaking refers to an exchange of signals between devices to establish their readiness to send or receive data, typically the operating signal will send a signal to a printer to see if it is ready to print (online) and the printer will return a signal indicating that it is. DMA (direct memory access) is the process whereby data is transferred from a peripheral to primary memory (or vice versa) without direct intervention from the microprocessor . A buffer is a small area of temporary storage used for data that is in the process of transfer from peripheral to primary memory or vice versa. An interrupt is a signal sent from a hardware device or an application to the microprocessor to indicate that attention (a service ) is required. Polling systems check each peripheral in turn to see if a service is required by that device. Control of peripherals (printer, modem, disk drive) Attaching peripherals to the CPU causes problems of matching processing speeds (the CPU performs operations in pico-or nano-seconds) with data transfer to peripheral devices ( disk drives operate at micro-seconds, printers may be even slower). These time differences are of several orders of magnitude. A temporary storage area, called a buffer is used to hold data waiting to be used by the peripheral, eg the printer. Meanwhile the CPU goes off and does "other stuff". When the buffer is empty, an interrupt signal is sent to the CPU which swings by and fills it again:
The peripheral must wait during this filling stage. To overcome this delay, double bufferin g (or even multiple buffering can be used. The peripheral empties one buffer while the CPU fills the other , then they switch:
Modems Disk drives Therefore data is transferred directly from primary memory to the drive and vice versa using the sytem of DMA (Direct Memory Access) . Normally all processes in the computer are controlled by the CPU but in this case the Disk Controller hardware takes care of the transfer. The controller signals the CPU - using an interrupt , when the transfer operation is complete. The CPU and drive controller have to be carefully synchronised so that they do not both try to access the same area of memory at the same time. DMA is used with disk drives (see above). Interrupts can be hardware or software generated and can occur for many reasons. Some are more important than others (they have different priorities). For example, on critical systems, a drop in the power supply line can be detected, indicating an imminent power failure. The processor can quickly save the state of all running processes to disk so that they can be resumed when the system is re-started. This is obviously a very high priority interrupt . As a more trivial example, a programmer could set an interrupt to keep a time display updated. This would be a much lower priority in most cases. One way of handling interrupts is to have an interrupt register where bits can be set and unset. Just before fetching the next machine language instruction from IAS (or cache) the register is checked to see if any interrupt requests are outstanding. Serial and parallel transmission In seria l transmission one bit is sent down the cable at a time. Parallel transmission is much faster in principle, as several bits can be sent down a multi-cored cable at the same time, however, only short distances can be achieved as the bits in a parallel byte quickly get out of step with each other. Because serial transmission does have the same requirement for precise timing, it can actually be faster in practice. In parallel a whole ASCII character could be sent in one clock pulse but in serial a start and stop bit sequence can be used instead, eliminating the need for accurate timing. related: [ Topic 6 home | previous: further networks ] |
|
|
|
|||
|
Questions or problems related to this web site should be addressed to Richard Jones who asserts his right to be identified as the author and owner of these materials - unless otherwise indicated. Please feel free to use the material presented here and to create links to it for non-commercial purposes; an acknowledgement of the source is required by the Creative Commons licence. Use of materials from this site is conditional upon your having read the additional terms of use on the about page and the Creative Commons Licence. View privacy policy. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. © 2001 - 2009 Richard Jones, PO BOX 246, Cambridge, New Zealand; This page was last modified: May 31, 2009 |