Monday 2 April 2012

Data Transmission and Networking


Data Transmission and Networking
   
Networks

All the systems that have been mentioned so far have been individual computers, sometimes with more than one user, but single processors. This means that the systems we have discussed so far are not connected to other machines. Imagine a classroom with 20 computers in it. Every time the lesson ends you would need to store your files on secondary storage. It would be possible to store the files on a floppy disk and take them away with you, but the likelihood is that the files will be stored on the hard disk. This means that the next time you want to use those files you need to sit at the same computer. It would be much more sensible to have a system that allowed access to the same files through any of the 20 computers. To allow this the computers need to be connected up to each other. When computers are connected together to share files they make a network. A network of 20 computers in a school classroom is obviously on a small scale, not because 20 is a small number, but because the communication is made easier because of the short distances involved. If a business with head offices in London and factories in Leeds and Manchester wanted to connect the computers on the three sites up there is an obvious problem of distances to be overcome. Generally, networks over small distances are called Local Area Networks (LAN) while those over great distances are Wide Area Networks (WAN). Whether the network is a WAN or a LAN it will have the advantage of offering the users the chance to communicate with one another, to share information centrally, to share copies of software and to allow multiple access to files of data. In a LAN there is the added benefit of being able to share hardware, so the classroom with 20 computers may only have 3 printers. Also those printers may be different types that could be used for different tasks. This means that the type of printer used is dependent on the job that the user wants it to do rather than the type of printer that happens to be connected to the computer on which the work is being done.

To summarise:
Computers can be linked together to form networks. If the distances are short the network is called a LAN, if longer the network is a WAN. Networks allow computers to communicate. Networks allow the sharing of both hardware and software.
 
Hardware and Software

Network Basics.
In order to connect computers in a network there are a number of essential things necessary. Each computer needs to be able to communicate with others. In order to do this there needs . to be a special piece of hardware attached to the processor, called a network card. It is through this network card that the computer can communicate. The computers need to be connected in some way. The standard method in schools is to use a cable. The cable is coaxial, like a television aerial. The cable has a limitation in that the signal gradually deteriorates as it is sent down the cable which means that the maximum length of the cable is about 300 metres. This maximum depends on a number of things, not least the quality of the cable used, but all cable is ultimately going to be limited in length. With a number of computers attached to the network, communications are going to get complicated. There is a need for something to control the signals being transmitted. This job is carried out by a computer whose job is to control the network, it is known as a server or a network server. One of the jobs of the server is to control access to the files held on a hard disk, because of this it is sometimes known as the file server. Some networks have a number of different servers controlling different parts of the system, for example, there may be a printer server to control use of the printers. On many LANs these server functions are all carried out by the single network server.The communications around such a system are obviously quite difficult to control. It is necessary to have a set of instructions that the network must follow, this is known as network software or a network operating system. A wide area network differs because the distances involved tend to be far greater than for a LAN. Consequently it is not possible to connect all the computers by a cable. Actually the cables already exist to do this, the telephone system. So to connect two computers over a long distance, they can simply ring each other up! Unfortunately, the type of signals produced by a computer are different to the type of signal that can be sent down a telephone line. In order to send a computer signal down a telephone line it must be altered first. This is done by another piece of hardware called a modem. A similar modem must be present at the other end of the line in order to turn the signal back again. 
 
Bit Rates
Information needs to be sent to devices in a computer system from other devices. For example, a picture stored in the memory of the computer needs to be sent down a telephone line to another computer. Remember that the more pixels that there are and the more colours that can be represented, the better the picture will be. However there is a limit to the amount of information that can be transmitted in a given time down the phone line, so a decision needs to be made. One choice is to have as much detail as possible and accept that it will take a long time to transmit it. The other is to limit the resolution of the picture, meaning that there is less information to send so that the message will be sent more quickly. The number of bits that can be sent in one second is known as the BIT RATE. The units used to measure the bit rate are BAUD. 1 baud = 1 bit per second. Note that text can be sent much more quickly than other forms of information because it
needs far fewer bits (1 byte per character) than other types of data. When data other than text is being transmitted, e.g. on the internet, it is important to limit the amount of data that needs to be sent or the time it takes to download the data can be unreasonably long. The data can be limited by such simple things as reducing the size of pictures so that they only take up a small part of the screen, or that they are restricted to a few colours. Speeding up the transmission of the information by reducing the amount of data that is sent is known as compression. This will be studied in more detail in the A2 part of the course.

Error checking and correcting

When data, of whatever type, is being transmitted from one part of a computer system to another, it is transmitted as a series of binary digits. Any data that is transmitted is going to be made up of a very large number of bits. Consequently, there are bound to be occasions when the data is not transmitted correctly. Luckily there are only two possible mistakes that can occur, either a 1 is received as a 0, or a 0 is received as a 1. Mistakes occur rarely, but when they do occur they can be very serious, as the information is no longer correct. This makes it very important that there should be methods for checking the data when it has been transmitted.

a) Echoing Back. The simplest way of checking the transfer of the data is to send it back again. If the data that is sent back is the same as the data that was sent in the first place then the original data must have reached its destination correctly, if not then it needs to be sent again. This is known as ECHOING BACK. Echoing back is very effective, but suffers from having to send data twice, thus taking longer than necessary, and needing to be a duplex, or half duplex, system to allow data transfer in both directions. 
 
b) Parity. All data is transmitted as bits (0s and 1s). The Number of 1s in a byte must always be either an odd number or an even number. If two devices that are communicating data decide that there will always be an odd number of 1s, then if a byte is received that has an even number of 1s, an error must have occurred. E.g. the byte 01011000 has 3 ones in it. 3 is an odd number, so it fits the rule that it must have an odd number of ones. When it is sent there is an error in transmission so that the first bit is received as a one. So, the byte received is 11011000. This has 4 ones in it, which is an even number, so there must be an error. The receiving device would ask for it to be sent again.

Notes:
If two mistakes are made in the same byte they will cancel each other out and the faulty data will be accepted. This problem can be overcome, and in the same way, a clever way of correcting error mistakes can be implemented. This method is not part of this course. Earlier in this course it was said that a byte was the number of bits necessary to hold a character code. Specifically, an ASCII character uses 8 bits in a byte, giving 256 different characters. This is not true because one of the bits has to be reserved for a parity bit, the
bit that can change to make sure that the number of ones is always odd. This means that there are 128 different characters possible. The implication in all the above work is that odd parity is always used. Even parity can equally well be used, whichever has been agreed between the two devices. Parity is not only used during data transfer between devices, but also when data is transferred between different parts of the CPU.

c) Check Sum. Data will normally be sent from one place to another as a block of bytes rather than as individual bytes. The computer can add numbers together without any trouble, so another checking procedure is to add all the bytes together that are being sent in the block of data. The carry, out of the byte, is not taken into account, so the answer is an 8 bit number, just like the bytes. This answer is calculated before the data is sent, and then calculated again when it is received, and if there are no errors in the transmission, the two answers will match.

Switching
When a message is being sent from one machine to another, particularly over a wide area network, the message may have to pass through other machines first. This may be forced on the system because there is no direct route from one machine to another. In the network shown, it would be easy to send a message from A to D or from A to B because A is directly connected to both of them. However, sending a message from A to C is much more difficult because there is no direct route. There are two ways that the message can be sent:

a) Packet switching. The message is split into a number of equal sized packets. Each packet has a label saying where it is meant to be going and what number packet it is. These packets are sent along communication lines towards the destination. Each time a packet reaches a node on the network the node decides which direction to send it on. So, one packet in the message from A reaches node D. The obvious route to take is the one directly to C, but it is already in use for another message, so D decides to send it to E instead. The next packet arrives at D and, this time, the line to C is free, so the packet is sent direct to C. When the message has all arrived at C it has to be reassembled in the correct order.

b) Circuit switching. Before the message is sent, the network reserves a route from A to C. The message can then be sent directly from A to C and will not need to be reassembled when it gets there. Packet switching allows optimum use of the connections around the network because as many routes are in use at one time as possible, whereas circuit switching means that the whole message is kept together so it does not need to be reassembled at the destination. 
 
 1.6.8/1.6.9 Protocols
When data is being transferred from one place to another in a computer system there must be rules set up as to how the transfer is going to be done. Typical rules would be A rule about the wire connecting the two parts of the system. Errors would occur if one device had a serial connection and the other was expecting a parallel connection If one device sent data at a particular bit rate and the other device read what it received at a different rate, the message would never be received correctly. If one device used even parity and the other device used odd then no correctly sent byte of information would ever be accepted. The set of rules that needs to be set up to allow the transfer of data to be carried out is known as a protocol. There are a number of protocols that you may have heard of e.g. http, tcp(ip) but don’t worry about them, you do not need to know specific examples of protocols, but you should be able to discuss some of the rules that go to make up a particular protocol. 
 
Layering of Interfaces
The interface between two devices is the connection between them through which the data can be sent. This connection between the devices can take the form of the physical connection, whether wires are used or some other form of connecting them together. However, it also includes many other things like how error correction is going to be carried out, how messages are routed from one place to another, how the flow of data is going to be controlled, how the data transfer can be synchronised so that data does not become mixed up, and many other things that need to be agreed upon. This is a very complicated idea, but, in essence, there are two ways of setting up this interface. One way is to try to do the whole thing in one go, and the other way is to divide the interface into sections and do one bit at a time. For instance, first set up the rules about how the devices are to be connected physically, and later on worry about how to spot errors
that have been made in the data transfer. This is known as layering the interface because the most basic layer has to be done first and then more layers may be put on top. The main advantage of layering the interface is that changes may be made to one layer without having to change them all. It also allows manufacturers to develop devices for  particular layers, knowing that they will be compatible with other devices at that level.

Advantages and Disadvantages of Networking

Advantages.
The main advantage of linking computers in a network is that they can share data. If two computers each have their own copy of a database then, unless no changes can be made to it, one computer will always have a more up to date version than the other because a change made on one machine will not register on the copy of the database on the other machine. If the two machines are networked there only needs to be one copy of the database, therefore any change made to the database will be used by both machines. The machines can be used to communicate, a good example being the use of e-mail over the internet. On a LAN the sharing of hardware and software between machines can reduce the cost of a large amount of computer equipment being needed in a small area, although, the saving on software is not necessarily what might be thought because the license for network software is far more than for a single machine. Also on a LAN, access to files does not depend upon the physical location of the user, but on who the user is. For example, in a school classroom, if a pupil was working at a particular machine at the end of one lesson they do not have to use the same machine the next lesson, they may even be in another room. 
 
 Disadvantages.

The fact that the network allows access to user files from more than one machine means that keeping files secure is far more difficult. Methods like user ID and password systems have to be employed to ensure that the correct users are given access to the correct files. If there is a fault on the network it can effect more than one stations, and if the server is faulty the whole network will fail.

No comments:

Post a Comment