 Just to remind you from last week, we finished talking about the performance of different performance metrics for computer networks, data communication systems, and we had a few examples on data rate and throughput, and we mentioned briefly bandwidth. So we're talking about ways that we can measure the performance of our communication system. How can we choose one technology which is better than another with respect to performance? Some measures, the range of frequencies that a system transmits or is allowed to transmit the bandwidth, we haven't really covered that in any depth. In the next topic, we'll define it and discuss it much more bandwidth. But two that we did cover with some examples, the data rate is the number of bits, a communications channel, think of a link, a channel or a link, or a network can transmit. So our example was when I connected two computers together via a LAN cable, the number of bits I can transmit per second in my example was 100 million bits per second. That was that data rate. It depends upon the medium and it depends upon the transmitter and receiver. For example, my LAN card, it's usually a characteristic of that technology. Think of that as some upper limit of a communication system that defines the upper limit at which we can transmit information across that link or network, a capacity sometimes it's called. But when we're transferring data across that communications link, although we may have some data rate, the way that the protocols normally operate is that when we're transmitting information, not all of that information is real data. Some of it is some extra headers that the protocols need to operate, generally we refer to as overhead. So we can distinguish between what we sent, the bits that we send across the link can consist of real data, data from the user's perspective and overhead, other information. In fact, sometimes we may not be transmitting anything at all, which is further overhead. Throughput is the measure of the rate at which we deliver the real data to the destination. So it only counts the data from the user's perspective, it doesn't count the overhead. That doesn't help the user much, although it's necessary, it doesn't help in terms of performance. So the rate at which the data is successfully delivered to the destination, although we haven't touched upon it, in some cases we can send data across a link, but there may be an error and it's not delivered to the destination. Throughput doesn't count that, it's only the data that gets delivered correctly to the destination. So we saw in an example I had a 100 megabit per second link between two computers, that was my data rate, 100 megabits per second, but when I downloaded a file I achieved a throughput of something like 90 or 88 megabits per second. So the capacity was 100, but the rate at which the real data was delivered was slightly less, in our case about 90 megabits per second because some overheads involved. And the last example last week was I used the Wi-Fi, the wireless LAN, where my data rate, the connection from laptop to the access point was 54 megabits per second, that was the capacity. When I downloaded a file I achieved a throughput of something like 17 megabits per second, much less than the capacity. So the user cares about the throughput, so that's one metric that we're interested in, but in practice it's hard to predict what the throughput will be, there are many factors that impact upon it. The data rate is usually a characteristic of the technology we use. So when you buy a technology often as part of a specification the data rate is given, but the throughput may vary. So there were two or three metrics that we've introduced, we've got one to go to finish this topic, delay. We won't cover packet delay variation in this course, just delay. The time it takes to get a message from one point to another is very simple. So I want to get, let's say, one message or a packet from one computer, the source computer to a destination computer, how long does it take to get that message from A to B, source to destination. That's what delay measures. Measured in the units of seconds, so now time we're interested in, not a rate. And generally the delay across a link or across a network, there are different factors that contribute to the delay, and we divide it into four different factors or components. Transmission, propagation, processing and queuing. So today what we want to do is explain those four and go through some examples to illustrate how they come together to cause a total delay in some network or link. We'll spend some time on each of them, especially the first two, but let's briefly explain them. Transmission delay is the time it takes to transmit the data out of the source computer. So for example, if I'm using my LAN card, I can transmit across the link at 100 megabits per second. So that's the speed at which I can transmit. If I have 100 megabits of data to send, how long will it take to transmit? Again? One second. If I have 100 megabits of data, that's the amount of data, and I can transmit at a rate of 100 megabits per second, then it will take one second to transmit that data, think of out of my computer. That's what we call the transmission delay. If I had 200 megabits of data to send using that same link, it would take two seconds to transmit. So the transmission delay is the time to transmit the data onto the link. Think of out of the computer. It depends upon the amount of data we want to send and the data rate that we have. Now when we transmit bits out of our computer, in fact what we're sending is some electromagnetic signal, some physical signal. In the case of my LAN card, when I plug the LAN cable in, the LAN cable contains some copper wires. And what we transmit across those copper wires is an electrical signal, so electricity. So think of back in physics when we think of electricity or any type of signal, in fact we can think of it as some waveform. We can often visualise it as some waveform. So when we transmit an electrical signal out of my computer, it takes time to go across the wire to reach the destination computer. The time to propagate across the wire. And that's what we term the propagation delay. It depends on the medium that we're sending a signal across, the type of signal and the distance, the length of that link that we have to send the signal. So it's time to send a signal representing, we think of a single bit from the source computer to travel across our link to reach the destination computer. We'll give some examples of that soon. We have computers communicating via a link. Of course the computers before they send something and once they receive the data often need to do a little bit of processing to check the data, maybe the protocols need to do some processing or we send via an intermediate device. I connect this laptop to one intermediate device then that connects to another destination computer. When I send my signal into the intermediate device it must process the signal and then send to the destination. So we have computers involved here and each of them must do some processing. How long does it take? Well that's our processing delay or processing time. It's the time for the device, the computer device to process the data. The source computer, the destination computer and any intermediate computers. We will see that the transmission and propagation delay we can calculate them in simple cases. How long does it take my computer to process a single packet? Anyone want to guess? Well it's very hard to know. How long does it take a computer to do a little bit of processing? It depends upon how much data we need to process, how fast my CPU is, what other applications are running on my computer, how fast maybe my memory is, how much memory I have to spare, maybe my hard drive speed. So it depends upon the hardware and also how that hardware is currently used. The processing time of a computer to process some data is usually very hard to calculate or predict what it will be. The good thing for us is that in most network systems, communication systems, the processing time incurred by computers is usually, when we compare it to the others, is usually very small because computers are fast today. We have gigahertz CPUs. Most computing devices, even if they happen to process a lot of data, usually the processing time is quite small compared to the others. So we'll see in some examples that it's either given or it's assumed to be zero. I would say a little bit more about that in the examples. The last delay is the time some data spends waiting for other data to be processed, waiting in a queue. Let's come back to that through an example a little bit later after we go through the first three. So we'll see that to get data from A to B, different things slow down that data transfer. Transmission, propagation, processing and queuing. We're going to go through each of them. And the total delay, if we know the delay caused by each of these components, the total delay is just the sum of each of them. So if we look at them separately, then we can determine the total delay by adding them up. Let's go through transmission and propagation first. We've got different examples today. So transmission delay, one example, we said 100 megabits of data to send at a data rate of 100 megabits per second will take one second of transmission delay. So transmission delay is really data size divided by data rate. What about propagation delay? How long does it take to get a signal across some medium? Well let's think of an example of a signal that we see all the time. The clock. Okay? Everyone watches the clock waiting for 4pm. The clock emits some light. Okay? You're sitting here in the class looking at the clock, maybe you're six metres away from the clock. The clock emits some light that light travels. Remember, light is just a signal. Think of a waveform for light. Light travels from the clock and it reaches your eyeballs, okay? How long does it take to reach your eyes? Give me a number. Give me a more precise number, less than something, greater than something, nice, but give me the answer. Or something, yes? How would you calculate that? Oh yeah, okay, but now give me the exact number. You're six metres away from the clock. Light speed, okay? The speed of light, okay? Light in this case is our signal. And light travels at a particular speed. So it's generated there and it travels through the medium, the air, and it reaches your eyes. How fast does it travel? Well, at the speed of light. Anyone remember? Speed of light? Okay, I think you're on the right track. And you may not remember, but you will after today. The speed of light, approximately, in fact it's a little bit less than this, people tell me, 300 million metres per second. It's actually slightly less, but for this course we can assume it's that. So the light that comes out of the clock and reaches your eyeballs is travelling at a speed of 300 million metres per second. The speed of light, or which is the same as 3 by 10 to the 8 metres per second. Distance from the clock to your eyes, for a simple example, six metres, okay? Someone sitting six metres away from the clock. So how long does it take to get there? Well, we've got something travelling some distance of six metres at a speed of 300 million metres per second. Then distance divided by speed or rate will give us the time. So in this case, the propagation delay, the time for that light signal to propagate across the medium from the source to the destination is our distance of six metres divided by our rate of 3 by 10 to the 8 metres per second, 2 by 10 to the minus 8 seconds. So there's our propagation delay in this simple example of light being our signal travelling across this six metre distance. Any questions on that? This is physics from many years ago. You've all studied it, but maybe we need to connect it to communication systems. Another example, I'm sending, I don't have the cable with me, but I plug the LAN cable from this laptop into this PC, maybe one metre in distance. And I transmit the bits and as the signal is generated at my laptop, an electrical signal, it passes through the copper wiring and then reaches this PC. How long does it take? What's the propagation delay? How are you going to calculate it? To send the signal from my laptop to PC, what do you need to know? The propagation delay, how are you going to calculate? Answers not there, answers on the board are very close. Distance divided by, is this a data rate? Is this bits per second? What is this? The speed of light, a speed, think of a speed in this case. It's the rate at which light travels, but for simplicity, let's call it a speed, the speed of light in this case. So our propagation delay is the distance, the physical distance divided by the speed at which we're sending a signal. But now the case is a one metre cable between laptop and PC sending an electrical signal. Well, distance, say a one metre cable, what's the speed at which electricity flows through the copper wire? Anyone want to have a guess? Speed of electricity through my copper wire. Approximate. Is it bigger than the speed of light? No, nothing is. And let's say it's, so you don't know. It depends upon the material which the electricity is flowing through. So copper in some case, if we dealt with another material like sending light through optical fibres and have a different speed. But they're all in the range of between about two by ten to the power of eight and slightly less than the speed of light. So I don't know the value. You'd have to look up the exact structure of the material which it flows through. But it's approximately or slightly less than the speed of light. And depending upon the material, maybe two by ten to the power of eight, two point five by ten to the power of eight, let's say, let's give it a number. So instead of 300 million metres per second, let's say it's slightly slower. 200 million metres per second. So if we know the speed, we can calculate the propagation delay. Our one metre divided by the speed, which is five nanoseconds in this case. So same concept, just have different values. The distance divided by the speed. So in real communication systems, what is the speed? Well, it depends upon the material. Usually in the order of two to three by ten to the power of eight metres per second. In this course, unless I tell you the exact values, I won't require you to remember the exact value for different materials. Unless I tell you, then you can assume it's the speed of light. So if I say, in this exam question, you're using copper wires, the speed of light, the speed of transmission is two point five by ten to the power of eight metres per second. Then use that value. But if I don't tell you the speed, then use the speed of light. Because they're very close. We'll see they'll have only small impact upon the end answer in the end. So distinguish between the time to transmit the data, the bits, and the time for the signal representing a bit to travel across the link, the propagation delay. And both of them we can calculate, at least in simple cases. Let's go through one example. This you have in your lecture notes. If you flip through a few pages, you'll see this one on performance examples. And it just gives a very simple calculation. So case one. In fact, in this case, in this example, I'm going to assume the transmission speed two point eight by ten to the power of eight metres per second. Where did this number come from? I looked it up on some website to find out for a particular material what the speed was approximately. And the one I looked at was two point eight by ten to the eight metres per second. We want to calculate the total delay. I'll denote as D being delay of some path or some link. In the case one, we have two devices connected via a single link. A connected to B. So just one link in this case, a very simple system. The data rate of this link is one megabit per second. The length of the link is 10 kilometres. And we want to send one message, one packet containing 100 bytes. How long does it take? Well, we'd normally consider the four components of delay. Transmission, propagation, processing and queuing. We've got a helpful hint at the start saying, for this case, let's assume the processing and queuing delay are very small. Because in practice, they often are in some such simple cases. So very small, let's say they're zero. That means the total delay is really just the processing and propagation delay added together. So we can calculate them separately. Transmission delay, we take the data size, how much data we need to send, divided by the data rate. So I think computer A wants to send 100 bytes to B. It has that 100 bytes of data. What it does is think it transmits one bit at a time. It transmits the first bit onto the link as some signal, then the second bit, the third bit and so on. And it's doing so at a speed of one million bits per second. So in this case, we have our 100 bytes sent at one million bits per second. And we can get our answer for our transmission delay. And be careful of our units and prefixes. Bites, bits, convert one into the other. So we have common units. So 100 bytes is the same as 800 bits, divided by one by 10 to the power of six, mega, 10 to the power of six, bits per second, 800 watt. What's our prefix and units here? 800 minutes, seconds, milliseconds, no, 800 watt. Nano is 10 to the power of minus nine. Someone said milli, someone said nano. Micro, 800 divided by one is 800. And then one divided by 10 to the power of six is 10 to the power of minus six. 10 to the power of minus six, you need to remember your prefixes. Some of you have taken the online lesson. If you haven't already, you can do it after today. Because in the examples, in the exams, I'll expect you to be able to calculate these quite quickly. 10 to the power of minus six, 10 to the power of minus three is milli, 10 to the power of minus six is micro, 10 to the power of minus nine is nano. So 10 to the power of minus six, micro. A u or, in fact, the mu is the character. Microseconds, in the handout, I've given the answer in milliseconds. It's the same, 0.8 milliseconds or 800 microseconds. Questions, propagation delay is the other component of our total delay. So this is the time to get all 800 bits out of computer A. But when a bit comes out of computer A, it's some signal that propagates across the link. How long does it take to propagate across the link? It depends upon, so what's the propagation delay? It depends upon the length of the link, the distance, and the speed of our signal. How long is our link? 10 kilometers. What's the speed of our signal? In this question, transmission speed, the speed at which we transmit a signal, 2.8 by 10 to the 8 meters per second. And I need my calculator. What was the answer? Maybe I can remember it from yesterday. You can check. 36 microseconds. So our signal takes some time, or our data takes some time to be transmitted, and also each bit that is transmitted takes 36 microseconds to propagate to the other side across that link. If we start transmitting at time zero, at what time has B received all the data? What's the total delay from start to end in this case? This is the propagation delay. This is the transmission delay. What's the total time? It is, in fact, the sum of these two, 836 microseconds. I'll show you another example of a more detailed explanation of why we just simply add the two in a moment. But note, the total delay, and it turns out the same with the other components, is just the summation of each of the components. So if you can determine the propagation delay, the transmission delay. In this case, the processing and queuing delay was zero, but if they were non-zero, if they were given to you, you just add them all up, and you get the total delay. I think the answers I went through on the board are the same as up here, except I use milliseconds. So 0.8 milliseconds, 0.036 milliseconds, total delay is 0.836 milliseconds, or 836 microseconds. There are two more examples in this handout. Case two, you can go through in your own time. We'll go through case three shortly. But let's skip to a different example. This is an example that you don't have. But these slides and some of the pictures in here, they are available on the website. I didn't include them in the handouts. I forgot, but they are on the website. It's a very simple example, no harder than the one before. So don't worry about copying everything down here, but solve the problem. Spend two minutes to find the answer of this case. And to get you started, so we have five bits of information. The data size is five bits to send from A to B. We have a link from A to B is 4.5 kilometers long. The data rate at which A transmits is 500 kilobits per second. What's the total delay? We're delivering that one message of five bits from A to B. And in this question, I don't specify the transmission speed. So when I don't specify the transmission speed, use this value, the speed of light, 300 million meters per second. Just try and quickly solve it. Don't worry about copying down the question too much. I prefer to see the answer. Draw a picture, maybe, is the best way to get started, like the one I've drawn on the board. Capture that information. In the exams, you're allowed to have a calculator. And therefore, it's useful to have one. I don't expect you to calculate everything in your head. So think of the components of delay and then calculate them individually and add them up. Read the question carefully. Be careful of the units. So probably the hardest thing is to make sure you're careful with the units and the prefixes. Check your units in both calculations. In this case, since I haven't given the speed, you can use the speed of light. That's what I used in the answer. So that would be OK, but just to get the same answer as me. OK, so calculate the answer and you're there. Any answers? Final answer? Is that your answer? It's wrong. What went wrong? What's the question say? Five bits, not five bytes. I see most people calculating in the right approach. There's no bytes in this question. Everything's in bits. OK, probably close enough. At least in my answer, I assumed the speed of light. Instead of 2.8, I assumed 3. But that's OK. I mean, there's no problem there. So I think your answer in that case is correct. Anyone want to tell me an answer? Final answer? 36. Maybe, but one thing, I used 3. 3, but that's OK. In any case, the one thing you've got me wrong, you say five bytes, I say five bits. It has five bits. But other than that, I think it's correct. 1, 2, 5, very close. I think your units or your one decimal place off. You just add them together. Just add. Add two numbers. How hard can that be? Sounds good. I think most people are there. No, there's no bytes to convert to. There's five bits, 500 kilobits per second, 4.5 kilometers. And when we go through the answer, I use this as the speed of light or the speed of transmission, not 2.8, as was in the previous question. But in an exam again, if I don't tell you, use the speed of light. But when you need to make an assumption like this, I assume the speed of light, then in an exam at least, you can write it down. If you say, I assume the speed of transmission is 2.8 by 10 to the power of 8 meters per second, I will mark your answer correct if you state that. If you assume 3 by 10 to the power of 8, also correct. But just make it clear which value you chose. Unless I tell you otherwise, you can assume the speed of light. Now, some people are having trouble adding two numbers together, but that's just an issue of making sure you're using the right units and the right prefixes. And you'll see in what I go through. Let's check. We'll go through the long way. Remember, there are four components of delay. In the question, in this question, I say nothing about processing or queuing delay. So that's a hint to you when you're answering this question. Let's assume they are zero. Because we'll see in a simple case like this, they are most likely very small. So we need to make some assumption because we cannot calculate processing or queuing delay, not in this course. So assuming the processing and queuing delays are very small, zero. Therefore, we just have two components to consider. Let's consider them separately. Transmission delay. Now, what is the transmission delay? Well, I'm going to go through the long way and try and illustrate what we mean by transmission and propagation delay. Here's my pointer. You can calculate them. I see everyone calculating of transmission, data size divided by data rate, and propagation length divided by speed or distance divided by speed. I'm sure you can do that. But why do we simply just add them together to get the total delay? And maybe this will help in the explanation. What I'm going to do is draw a diagram that shows what happens at the transmitter A and when B the receiver receives the data, let's say there's a link between them, and show what happens over time. So what this diagram shows at the top, let's say we start our stopwatch at time zero, and we'll draw things on here that show what happens as we increase the time. And these numbers are measured in microseconds, just to save space, to make it clear I've omitted the unit. So at time zero we do something, and after one microsecond something's happened, and after two we'll draw on this diagram. Try and follow, again this is on the website if you want the details. So we have, recall, five bits to send. Just five bits to get out of my computer. So think my transmitting device transmits one bit at a time. The first bit, the second bit, third, fourth, fifth. One after another. How long does it take to transmit one bit? How long, how much time does it take to transmit one bit? Not quite. The rate was 500 kilobits per second. So we know how many, we know the rate it was given. The data rate was 500 kilobits per second, or 500,000 bits per second. We know that, that's how fast I can send. What my question is, how long does it take to send one bit? Okay, so we have a rate to get the time, take the inverse. This is how many bits in one second. We wanna know how many seconds for one bit. This is the number of bits per second, 500,000. One divided by 500,000 is 0.2 by 10, what have we got? If you, 0.2 by 10 to the minus five seconds, which is two microseconds. You can do the calculation. The inverse, here we have bits per second. Here we have seconds for one bit. Two microseconds in here. So one bit takes two microseconds to get out of my computer. Let's draw that. And I'll draw it as, right, sorry, this is transmission time of one bit, two microseconds. Let's try and draw that as this gray box, this rectangle. Because we start transmitting at time zero to transmit that bit, the signal representing the bit out of my computer, it takes two microseconds. So I'd finish at time two. And then I'd start transmitting the second bit and the third bit, fourth bit and fifth bit. And that's what I've tried to show here is these five gray boxes of the time to transmit the first bit, finishes at time two and then immediately start transmitting the second bit. Takes another two microseconds, finish at time four, third, fourth, the fifth bit is finished at time 10 microseconds. Five bits, two microseconds per bit, 10 microseconds to transmit. In fact, I think, well, that's what you calculated as the transmission delay. Just the data size, five bits divided by the data rate of 500 kilobits per second. Well, what's the other component? So transmission delay is 10 microseconds. Propagation delay, how can we visualize that? Well, again, when I transmit, we say we're transmitting a bit, as soon as we start transmitting, some signal comes out of my computer along the cable, some electrical signal. How long does it take a signal to propagate from A to B? Well, I think everyone calculated this or close to, the distance from A to B, 4.5 kilometers, the speed of our signal transmission, the speed of light, 4.5 kilometers divided by 300 million meters per second is 15 microseconds. So as the signal comes out of my computer, it takes 15 microseconds to get to the other computer. Let's try and visualize that. If I start transmitting at time zero, the signal comes out and starts propagating across the link. It takes 15 microseconds to get to the other endpoint of the link, that is to B. So if it starts propagating at time zero, it will arrive at B at time 15. So from B's perspective, it will start receiving the signal that represents the first bit at time 15. That is 15 microseconds after A started transmitting. But in fact, A is transmitting a signal for a continuous period here. A is transmitting the signal out of the computer at time zero through to time two. That signal represents a bit one. So it's always transmitting a signal. Therefore, when it finishes transmitting that last part of bit one, the last signal, at time two, you can think that will arrive at B, again, 15 microseconds later, at time 17. This is the signal propagating across the link. So at this time, B has received the entire first bit. While that signal is propagating from A to B, A is in fact transmitting the second bit and then the third bit, fourth bit and fifth bit. And if we draw them all, we see that as we're transmitting, and the signals representing those bits are propagating across the link. We finished computer A finishes transmitting at time 10. So that signal that comes out of computer A at time 10 is propagating across the link. It's taking its time to get there, and it eventually arrives 15 microseconds later at time 25. So if we finish transmitting at time 10, it will eventually arrive at time 25. And that gives us our total delay. It's the time from when A starts until B receives the entire set of data, the five bits in this case, which is mathematically here the transmission time 10 plus the propagation time 15, giving us the answer of 25 microseconds. So there's two parts here that we're trying to cover, or multiple parts. Transmission delay, data size divided by data rate, propagation delay, distance or length divided by speed. Total delay is the summation of the components. Why? Why do we just add the propagation and transmission delay? Well, this diagram tries to show that we're transmitting at the same time some of those signals are propagating. The total time is the time it takes to transmit all bits plus the last signal to get to B. And that's just the summation of the two and gives us our total delay of 25 microseconds. Got some more examples. Before we move on, what about this one? Any questions? Again, you can download those slides from the website to see the details of that picture rather than having to draw it. Here's a hint, if you don't understand this, at least remember you add the two, you add the delay components together. If you can calculate transmission and propagation for a link, the total delay is the summation. This tries to explain why it's the addition of those two. OK? Easy. So far. The maths is easy. Maybe just be careful. I see people calculating and trying to add up numbers like... What do you have? Trying to add numbers like this, I see people. So not as obvious as taking... So try and use the same multipliers or prefixes here and then the addition is easy. It's just 10 plus 15 by 10 to the minus 6. So try and make your life easier by using appropriate prefixes and units. For example, in this case, I converted everything to microseconds and I ended up just adding microseconds, 10 plus 15. So you can make your life easier by using appropriate prefixes. One more calculation example, then I'll have an example on the computer, a quick demo and we'll finish for today. And the calculations from this performance example, so you have it already. Case two was we extended the link length from 10 kilometres to 1,000 kilometres. We won't go through the calculation, but everything's the same here, but now we have 1,000 kilometres. Transmission delay will be the same because the data size and data rate are the same. Propagation delay, the length has increased from 10 kilometres up to 1,000 kilometres. 100 times further. Our signal must propagate 100 times further in case two. Therefore, our propagation delay will be 100 times greater. Instead of 36 microseconds, it will be 3,600 microseconds. I hope that's the case. Something looks wrong in that calculation. 136.8, I think in this handout this value looks wrong. 357.1, I think it should be 3.6 in this case. We went from 0.036 times by 100, yes. This should be 3.6, not 3.571. I don't know where that comes from. I must have used the wrong number somewhere. And hence, this would be 4.4 milliseconds. The longer the distance, the longer the propagation delay. That's all that one shows. Read through case three. The calculation's not hard. I know you have the answers in front of you, but try and think about how to solve that one. Try and draw a picture in the same way that I drew a picture of the link up there. We have a satellite communication system. We have a satellite in a geostationary orbit. That is, in this case, about 36,000 kilometers above the Earth. And that's in such an orbit so that when the Earth spins, the satellite is orbiting. And it's as if the satellite is always above us. It's fixed because the Earth is spinning at a rate and the satellite is orbiting at a rate such that it doesn't move relative to some location on the Earth. It's a common orbit for satellites for communication systems. And the way the satellite system works is that we have some station on the ground that transmits a signal up to the satellite. The satellite, in this case, takes that signal or takes the message and then sends that message down to some other ground station. So we have the distance from Earth to the satellite. When we transmit a signal up and down, we have the speed of transmission at the speed of light, in this case. The link data rate up and also down is the same, one megabit per second. And the satellite operates in a mode such that one ground station sends up a message. The satellite receives it. In this case, the satellite processes that message, the packet. The satellite has a CPU on board, a computer. It takes some time to process. It's an old satellite. It takes four milliseconds. I just made up that number for this question. So we cannot calculate the processing time. In some questions, I may give you the processing time. How long does it take to send a 1,000-byte packet from one ground station to another? Here's our network. We have a ground station. So something on Earth, say in Thailand, with an antenna. And it transmits a signal, some wireless signal, up to a satellite. The satellite receives the message. In this case, the message contains 1,000 bytes. So we start with 1,000 bytes. Transmits a 1,000-byte packet up to the satellite. When the satellite receives that packet, it simply takes the packet and transmits it down to another ground station or Earth station. Say this source A is in Thailand and B is in the US somewhere. So we transmit up the satellite down to some other location. How long does it take to get the message from A to B? Well, we try and record the information that we have distance of this link up, 36,000 kilometers. And the data rate of this link, 1 megabit per second. Transmission speed for this link, the speed of light, 3 by 10 to the 8 meters per second. So that's for this first link. In this case, we have a network. We have two links. And we send a message up to the satellite. The satellite then sends a message down. So we need to calculate the delay across both links. And again, the additive, the total delay will be the time to send up to the satellite plus the time for the satellite to send down to B. What's the distance of this link? What's the distance of the second link? It's the same. In reality, there may be slight differences, but 36,000 kilometers about, it may be tens of kilometers different, but it won't make much difference. So we consider the link separately. Distance, same data rate in this example. It doesn't have to be, but just keep it simple. Same speed of transmission in the second link. And in fact, it'll be the same size message because we send the message up to the satellite. The satellite just processes it and sends it down. Let's consider link one that's going up. Remember, we have four components of delay. And think about them for each link. Is there any processing delay at computer A? Question doesn't say it. Let's assume no. Let's assume any processing that happens at A is very small. There may be a processing delay. So I could say that at computer A, there's a processing delay of two milliseconds. But in this case, I haven't said there's a delay. Therefore, we assume it's zero. How long does it take to transmit the data? Well, we can calculate that. Data size, 1,000 bytes, data rate, one megabit per second, 8,000 bits is 8,000 microseconds. So we can calculate the transmission delay for the first link. How long does it take a signal representing one bit to propagate all the way from the Earth to the satellite? Our distance, 36 million meters, divided by our speed of 300 million meters per second. You can use your calculator, 120 microseconds. And queuing delay, in this case, there's no queuing delay. We haven't even mentioned queuing delay. So let's assume it's zero. We'll say something about that at the end. So let's record them. There's zero processing delay. There's a delay of transmission of 8,000 to propagate another 120 microseconds. The packet is received by the satellite. In this question, we say that the satellite takes four milliseconds to process. What have I done wrong? Yeah, the prefix is here is wrong. The propagation delay is 120 milliseconds. I was a factor of 1,000 out. So 8,000 microseconds is 8 milliseconds. Here I've made a common mistake using the wrong prefix. Transmission delay, 8,000 microseconds, or in the red here, 8 milliseconds. Propagation delay, 120 milliseconds, 120 here. So let's record in red the milliseconds as the prefix in unit. The satellite takes four milliseconds to process. So I'll just note here four milliseconds at the satellite. Then the satellite transmits the same packet down. What's the transmission delay does transmit down? It's eight again. It's the same, same data size, same data rate, same transmission delay. Eight to transmit down. Propagation delay, same distance, same speed of light, therefore same propagation delay in this case, another 120. There's no processing delay at B. There's no mention of queuing delay. What's the total delay? Add them up. It's just the summation of all the components. 260 milliseconds. So now we have two links. And the way to consider them is that the delay is additive. We can treat the link separately, determine the delay across each link and then add up to calculate the total delay. Link one, link two. Add them all together and we get the total delay in this case of transmission plus propagation plus the four of processing at the satellite. So always remember delay is additive. Across 10 links you just add up the delay for each link. And even the way that we calculate transmission, transmission, propagation, processing, queuing, we just add them up. Almost out of time for the day. That's the examples we've gone through for calculations. We've seen transmission propagation and a simple example of processing. Again, I will not require you to calculate the processing delay. We don't have enough knowledge in this course to do that. I would maybe give it to you in a question like in this case. The processing delay is X seconds. It's the time it takes the computing device to process the data. What's queuing delay? There's a fourth component we haven't seen in the examples. Queuing delay, the simple concept is the time it takes a message to wait in some queue. Usually waiting for other messages to be processed. And the example I commonly use is we go down to the cafeteria at lunchtime to order food and everyone's gone at lunchtime and you're at the end of the queue. There's 10 people in front of you. The time you spend in the queue waiting to place your order, think of that as the queuing delay, you spend a minute waiting for everyone else to order. So we're in a queue for some time. That's the time we wait for other people to be processed. The same can happen with our packets. Maybe not the best example. But there are other ground stations, C and D. They all transmit up to the satellite at the same time. Three packets. The satellite needs to transmit them down to B. But it can only send one at a time. So three packets arrive at the satellite. It needs to transmit them one after another to B. While the first packet is being sent, the other two are waiting in a queue to be sent at the satellite. So they incur some queuing delay. Then the second packet is sent. So the third one is still waiting in the queue. That's some extra queuing delay. And then it is sent. So queuing delay usually happens at intermediate devices, especially when there's other people trying to send. We'll see that when we go through the structure of the internet, we'll see that queuing delay can be quite significant. For now, queuing delay, the time our data waits in a queue to be transmitted. Again, we don't have the knowledge to calculate that in this course. I would give it to you for a particular question. But again, you just add it up. If I said in this question the queuing delay at the satellite was another 10 milliseconds, then the answer would be 270. If the queuing delay was 10, we just add that onto the total. Let's finish with a quick example. Some of you, when we spoke about online games, one of the measures of online games is ping, or ping is in fact a program that we can use to send a message from one computer to another. So I'm going to send a message from my laptop to the ICT server. And I use the program called ping on my computer. And what it does is my computer sends a message, a short one to the ICT server, and the ICT server sends back a reply. And this program, when it receives a reply, prints the time it takes to get there and back, the ping time, or the round trip time. So the first message, the delay from when I sent it, to get to ICT server, which is in fact downstairs, and come back to my laptop, the first time it took 27.9 milliseconds, this program just keeps sending messages and keeps measuring six, eight milliseconds, 22, it varies in this case. Because this message is going across the wireless network, the access point, down through some cables to the ICT server, and then the ICT server sends a message back. The messages are about 64 bytes. You can't see the six there, 64 bytes. And this is just the delay to get there and back. In our questions, we calculated the delay to get a message just from one point to another. This is giving delay one point to another and back. In the order of milliseconds in this case, we'll see some other examples of delay and how it impacts on our applications through this course. It gives some average, about 14 milliseconds on average, in this case. Let's stop there. We'll continue tomorrow morning and on the next topic of data transmission.