Saturday, 20 October 2018

Transferring Data

Well, here we are continuing with our discussion on transferring data. I guess it's important because a major part of the computer system is how data is transfered from one component to another, or from one machine to another. However, before we continue, here is a bit of revision courtesy of Techquickie:

Anyway, we are going to be looking at machine to machine transfers here, which in many cases operate in a way that is similar to transfers within the machine. So, the first things we need to take into account are the types of data transfers - simplex, half-duplex, and full duplex.

Simplex: well, this is basically one way communication, much like a television. Basically the television station streams information directly to your TV set (or not quite, but you know what I mean), but your TV set, usually, doesn't send anything back. Oh, and this isn't one of those Netflix style on demand services - the only way that you have a choice is simply by changing channel.

Half-Duplex: Well, I'm not entirely sure if this exists anymore. The only example I can think of are the old walkie talkies (which many of you probably have no idea what I am talking about). Basically, while communication is two way, only one person can speak at a time. It is sort of like, say, a business meeting, were you aren't actually allowed to interrupt anybody.

Full-Duplex: All I need to do is point to a telephone as an example of full-duplex communication. This is where communication is in both directions and simultaneous, which means that you can have a full on shouting match with somebody and the only way they can stop you from talking is to terminate the call.

Now, we have already started talking about this in a previous post, but before we continue, lets mention flow and error control. Now, as we all understand, not all machines are created equal - some are slow, others not so slow. Flow control basically prevents slower machines from being overwhelmed by bigger machines, and tells the sender when they should send the next packet of data. We saw this with stop and wait, where a packet is sent, and the sender then waits for an acknowledgement. Error control we have also covered, namely what to do when the receiver receives a packet that is erroneous.

Well, one method of flow control is called the sliding window method, and the diagram below should be able to explain it:

As you can see above, the window works on a method where multiple frames are sent, but only to a set amount. When a frame is sent the window shrinks, and when the acknowledgement is received, the window then expands. A similar process occurs on the other side, where when frames are received, the window shrinks, and then expands once the acknowledgements are sent. Now, it is important to note that only one acknowledgement is sent even though multiple frames are received.

So, what happens if there is an error? Well, the windows don't expand. The thing is that while the previous frames have been sent, they still sit in the buffer. The sender can send only up to the number of frames in the buffer while waiting for an acknowledgement. If it doesn't come, then that means that there has been an error. If it does come, then the previous frames are discarded, and new frames are loaded into the buffer.

Internet Protocols

First, let's touch upon what is called the Open Systems Interconnection, or OSI, model. It is one of the more commonly used systems of data transfer. Basically it defines how data is bundled and then transferred. At the bottom of the layer, they are transferred in bits, but as we move up the layers the bits are bundled into frames, and then into packets. This diagram may help, though here we are only really interested in the Data Link layer:

Anyway, we have two types of internet protocol (IP), TCP and UDP. TCP stands for Transmission Control Protocol, and is the most commonly known, and UDP, which is User Datagram Protocol. Now, the difference really comes down to speed and accuracy. TCP is slower, but much more accurate, while UDP is faster, but error prone. This is the main reason you tend to see TCP a lot more. Honestly, you really don't want to be doing bank transactions using UDP, though you might end up finding that that is the protocol that Netflix uses to stream its videos (though actually they don't, considering that High Definition television doesn't quite meet with UDP standards - it is actually used more for live streaming and gaming). The thing is that UDP really doesn't care about errors, and will keep on pumping out packets of data despite whether they have errors or not. One thing that does use UDP, is VoIP, or voice over IP, which are basically internet telephone services. Oh, and it is also used for gaming, where time is of the essence.

In the end, the best way to remember the difference is that TCP makes sure that the packets arrive the way they were sent and the order is intact, whereas UDP just keeps on pumping out packets, and doesn't particularly care either way.

Radio Days

Now, remember the days when you have a radio, or do you? Being a child of the 80s, I have fond memories of the radio, and the classic mix tapes. That was back in the days when you would listen to the radio with a cassette inside, waiting to press 'record and play' when your favourite song hit the airwaves. Anyway, there were two ways of transmitting radio signals - FM and AM. FM stands for Frequency Modulation, and AM stands for Amplitude Modulation. One thing I remember is that I started off listening on the AM band, until I discovered SAFM, and switched over to the FM band. Now that was all well and good, until we went out bush only to discover that I couldn't pick up SAFM. Interestingly, at night, my mum would turn on the radio to the AM band and listen to a Melbourne station broadcasting the football, and Melbourne was something like 700 odd kilometers away.

So, what's the different, well, once again we turn to a trusty little chart:

So, that explains everything, doesn't it. Well, not quite. Basically both methods consist of two waves, a carrier wave and the wave that the carrier wave is carrying (namely the data, or that heaps cool song that you have been waiting for ages to listen to, you know, Deep Purple's Highway Star). So, the carrier wave doesn't change, but the data does. So, notice with the AM the frequency, or the space that the waves are apart, doesn't change (or it isn't supposed to change), and the amplitude, that is the height of the waves, does. Notice also with the FM the opposite is the case, the height stays the same while the spacing changes. That pretty much explains it in a nut shell. The letters are the beginning, pretty much tell you how the data is carried.

Why do they do this. Well, it's simple. Consider sending a message. You can write it on a piece of paper, scrunch it up into a ball, and throw it, or fold it like and aeroplane. Which will go further? Well, the one folded like an aeroplane. Well, you could go one better and put the letter on an aeroplane and it would go even further (though it might not end up where you want it to end up). Basically, what the carrier wave does is that it increases the distance that the data can travel.

Now, there is a difference between the two. First of all, remember my ramblings above, about how I couldn't hear the FM in the bush, but my Mum could pick up an AM radio station from over 700kms away. Well, there is that, AM travels much further than FM, and even further at night. However, AM is actually of a lesser quality than AM. FM is always clear and smooth, until you move out of range and the quality would drop off sharply. However, AM wasn't all that good, and was even prone to interference from stations operating on a similar frequency miles away. In fact, in some places, AM radios have to, by law, shut down at night so as not to cause problems for other stations higher up the preference ladder.

Oh, and modulation, well, that is the process of mounting the data on the carrier wave, and demodulation is basically taking it off again. Oh, and AM is cheaper (you could actually buy electronics kits to build your on AM transmitter from the local hobby shop), and it has a wider range, which means that more stations can operate on it as well. Oh, and it is less affected by physical barriers.

Le Téléphone Portable

Mobile phones operate on megahertz (or Mhz) bands, and this is important to know because not all phones operate on the same bands. Basically, for a phone to work in Australia it needs to operate on one of the Australian bands. Now, I know that I don't have an issue with my phone because it worked just fine all over Europe and Southeast Asia (as well as here in Australia), however this is something we need to be aware of when shopping for a new phone.

Basically, these should be on the phone's spec sheets, and for 3G networks you will find it under UTMS or HSPDA. Actually, come to think of it, that is probably why, in Europe, my phone only ever seemed to operate on the 3G networks, despite the sales people assuring me that they supported 4G. It is just that the European 4G networks are actually on a different bandwidth than the Australian 4G network.

Oh, and for 4G networks, you need to look at FDD LTE. While I could go into details on what frequencies are used by what company, instead of wasting your time I'll simply refer you to this website

What I will show you (not that you'll be able to read it) are the frequency allocations. The Australian government basically controls what services use what frequencies. Those in Australia might remember back when television went from analog to digital, and then radio went from analog to digital. Basically what was happening was that they were freeing up space for other services to use. The same is the case with the 2G network, which has now been shut down. However, what they also do is when space is freed up, that space is then auctioned off the the highest bidder for their use.

I might come back to this later, particularly since there is a whole heap of stuff in the lecture notes about analog and digital radio transmissions that were covered in the tutes. However, let us finish off with some networking.


Honestly, there are lots of different types of topographies, but the two main ones are bus and star. The bus is basically where you have a single cable and a number of computers connected to it, while the star topography has all of the computers connected to a central hub, or switch. Now, the bus topography is cheaper, but limited by the number of computers that can be connected to it. It is also older technology, and is generally only good for older local area networks (LANs). It can also be difficult to detect faults from a single locations, and that maintenance gets trickier over time. Oh, and the more computers you connect to it, the slower it becomes, namely because you have all these computers competing for limited space. I probably shouldn't forget to mention security issues, since all of the computers receive the signal.

Now, star topography is where the computers are all connected to a central switch. Now this is somewhat more efficient than the bus topography, particularly since a failure may only affect a single computer. However, the problems arise with the fact that it relies upon a single device, and failure with the device is an overall failure of the network. The use of the central device, a hub, router, or switch, increases the cost of the network, and also the number of devices attached to the network is also dependent upon the device.

Creative Commons License

Transferring Data by David Alfred Sarkies is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. This license only applies to the text and any image that is within the public domain. Any images or videos that are the subject of copyright are not covered by this license. Use of these images are for illustrative purposes only are are not intended to assert ownership. If you wish to use this work commercially please feel free to contact me

No comments:

Post a Comment