You are on page 1of 77

I have attempted in this discussion of the OSI Reference Model to provide as much plain English explanation of how it works

as I could. However, there are situations where a good analogy can accomplish what lots of descriptions cannot. So, I am going to attempt to illustrate the key OSI model concepts (layers, vertical communication, horizontal communication, data encapsulation and message routing) by way of a reallife analogy. You can be the judge of whether it is a good analogy or not. Just remember that no analogy is perfect. Our scenario seems relatively simple and common: the CEO of a Fortune 500 company needs to send a letter to the CEO of another large company. Simple, right? Just like firing up your browser and connecting to your favorite Web site is simple. However, in both cases, a lot goes on behind the scenes to make the communication happen. In the analogy shown in Table 17 below, I compare these real-world and "cyber-world communications. Note: (Yes, the first CEO could fly to the other one's town in his Lear Jet, take him out for a lobster-and-martini dinner and hand him the letter there. Please play along, will you? Oh, and sorry to any CEOs for the blatant stereotyping.

Table 17: OSI Reference Model Real-World Analogy Phase OSI Layer CEO Letter Web Site Connection (Simplified)

You decide you want to The CEO of a company in connect to the web server at Phoenix decides he needs to IP address 10.0.12.34, which send a letter to a peer of his in is within your organization but Albany. He dictates the letter to not on your local network. his administrative assistant. You type the address into your browser. The administrative assistant transcribes the dictation into writing. The administrative assistant puts the letter in an envelope and gives it to the mail room. The assistant doesn't actually know how the letter will be sent, but he knows it is urgent so he says, get this to its (Generally, with a web site connection, nothing happens at this layer, but format translation may be done in some cases.) The request is sent via a call to an application program interface (API), to issue the command necessary to contact the server at that address.

Transmission

destination quickly. The mail room must decide how to get the letter where it needs to go. Since it is a rush, the people in the mail room decide they must use a courier. The envelope is given to the courier company to send.

The Transmission Control Protocol (TCP) is used to create a segment to be sent to IP address 10.0.12.34.

Your computer creates an IP The courier company receives datagram encapsulating the the envelope, but it needs to TCP datagram created add its own handling above. It then addresses the information, so it places the packet to 10.0.12.34. but smaller envelope in a courier discovers that it is not on its envelope (encapsulation). The local network. So instead, it courier then consults its realizes it needs to send the airplane route information and message to its designated determines that to get this routing device at IP address envelope to Albany, it must be 10.0.43.21. It hands the flown through its hub in packet to the driver for your Chicago. It hands this envelope Ethernet card (the software to the workers who load that interfaces to the Ethernet packages on airplanes. hardware). The Ethernet card driver The workers take the courier forms a frame containing the envelope and put on it a tag IP datagram and prepares it with the code for Chicago. They to be sent over the network. It then put it in a handling box packages the message and and then load it on the plane to puts the address 10.0.43.21 Chicago. (for the router) in the frame. The frame is sent over the twisted pair cable that connects your local area network. (I'm ignoring overhead, collisions, etc. here, but then I also ignored the possibility of collisions with the plane. ) The Ethernet card at the machine with IP address 10.0.43.21 receives the frame, strips off the frame

Routing 2

The plane flies to Chicago.

In Chicago, the box is unloaded, and the courier envelope is removed from it and given to the people who

handle routing in Chicago.

headers and hands it up to the network layer. The IP datagram is processed by the router, which realizes the destination (10.0.12.34) can be reached directly. It passes the datagram back down to the Ethernet driver. The Ethernet driver creates a new frame and prepares to send it to the device that uses IP address 10.0.12.34. The frame is sent over the network. The Ethernet card at the device with IP address 10.0.12.34 receives the frame, strips off the headers and passes it up the stack. The IP headers are removed from the datagram and the TCP segment handed up to TCP. TCP removes its headers and hands the data up to the drivers on the destination machine. The request is sent to the Web server software for processing. (Again, in this example nothing probably happens at the Presentation layer.)

The tag marked Chicago is removed from the outside of the courier envelope. The envelope is then given back to the airplane workers to be sent to Albany. The envelope is given a new tag with the code for Albany, placed in another box and loaded on the plane to Albany. The plane flies to Albany. The box is unloaded and the courier envelope is removed from the box. It is given to the Albany routing office. The courier company in Albany sees that the destination is in Albany, and delivers the envelope to the destination CEO's company. The mail room removes the inner envelope from the courier envelope and delivers it to the destination CEO's assistant. The assistant takes the letter out of the envelope. The assistant reads the letter and decides whether to give the letter to the CEO, transcribe it to email, call the CEO on her cell phone, or whatever. The second CEO receives the message that was sent by the first one.

Reception

The Web server receives and processes the request.

As you can see, the processes have a fair bit in common. The vertical communication and encapsulation are pretty obvious, as is the routing. Also implied is the horizontal communication that occurs logicallythe two CEOs seem to be connected despite all that happens to enable this to occur. Similarly, the two assistants are logically connected as well, in a way, even though they never actually converse. Of course, this example is highly simplified in just about every way imaginable, so please dont use it as a way of trying to learn about how TCP/IP worksor courier services, for that matter.

On arrival at the other office, the courier service envelope is unwrapped. The inter-office envelope is then delivered to the addressee, and he unwraps that envelope to read the document. Your document is like the HTML (or other data) used by HTTP. HTTP is like the inter-office envelope, that you (the user) relates to. The mail guy and mailroom are like your web browser that wraps lower-level protocols like TCP/IP over the high-level protocol like HTTP. The courier service envelope is like TCP/IP. The courier service is like the Ethernet transport service, that actually moves the goods.

If youre looking for a more credible source of information, you can always refer to this article as one of the many. But this general pattern always holds: the faster we want our memory, the smaller it will be, since there (a) isnt that much room right beside the CPU, and (b) its really expensive real estate, just like the cars assembly line.

Before we sign off, heres a few more parallels you might have noticed:
1. The manufacturing plant is equivalent to the CPU. Inside that one building is contained both the shelf and the backroom, just the like CPU contains the registers and cache in one complete package. These first two tiers of memory are so performance critical that theres no point putting them anywhere else. 2. The current model of car being built is equivalent to whatever program is running on your CPU. Most of the parts you will ever need for it can be found, at worst, in the warehouse, just like the important parts of an application are loaded into RAM before being run, in order to maximize performance.

Pipeline Stages
Lets now go back to our car assembly line over in Analogy Land. Now would be a good time to go back and read the first part about memory hierarchy, since the following part will build on what was covered before. In order to build up our car as efficiently as possible, we need to be smart about how we manage our time, our space and our workers. We dont want to have to micromanage every employee and tell them what to do at every moment because that wouldnt be very efficient. It would also be terrible for employee morale, but luckily computers dont have feelings. Instead, we can break up all of the work that needs to be done into a minimal set of tasks, one for each employee:

1. Instruction Read

Heres how workflow will be structured: In order for the cars assembly to go smoothly, weve created an instruction manual. Its nothing more than a list of all the steps that need to be completed, but its extremely explicit so nobody could possibly get it wrong. The first workers job is simply to read the current instruction and print out several copies, give them to all the other workers so they know what to do next, then cross it off and get ready for the next one. This guys job is the Instruction Read (IR).
2. Instruction Prepare

Next up, the guy in charge of the Instruction Preparation (IP) for the current execution. He reads the instructions given to him, and then grabs the two parts needed off the shelf and drops them right in front of the assembler, who is next in line.
3. Perform Assembly

Its then dead simple for this worker to Perform the Assembly (PA) as he doesnt need to get up or even think; he just grabs the two pieces in front on him, attaches them, and passes on the result. It might seem silly to leave him so little to do, but since his individual jobs can sometimes be long (like attaching the transmission to the engine), we dont want him to have to worry about anything else.
4. Backroom Access

Then, if the piece weve just finished wont be needed for a while, like a completed engine, we dont want it taking up space on the tiny shelf, so we want the next worker to be dedicated to transport; hell grab whatever were done with and bring it to Access the Backroom for storage (BRA). We can also use him to go get a piece well be needing soon and bring it to the shelf. While this guy isnt always needed on every instruction, when we do need him the round-trip to the back room takes a while, and so its worth having someone dedicated to this job.
5. Bring Back To Shelf

Finally, if were done with the piece but well be needing it again soon, like the engine in the middle of assembly, our last worker Brings it Back to the shelf (BB) so itll be ready to go for the next instruction. Breaking away from the analogy for a moment, the table below shows how the assembly line stages compares to an actual CPU pipelines stages. The canonical example is the classic RISC pipeline, because its the simplest one to understand that exposes the most relevant technical aspects of pipelining.
Fictional Assembly Line Stages Classic RISC Pipeline Stages

Fictional Assembly Line Stages Instruction Read (IR) Instruction Prepare (IP) Perform Assembly (PA) Backroom Access (BRA) Bring Back To Shelf (BB)

Classic RISC Pipeline Stages Instruction Fetch (IF) Instruction Decode (ID) Execute (EX) Memory Access (MEM) Write Back (WB)

An actual computer would perform tasks a lot like the workers above: first it would fetch an instruction (IF) from the currently running program, pass it to the next stage and move on to the upcoming one. Then the instruction would be decoded (ID) to figure out what we actually need to do and grab the two registers were going to do math with. The execution unit (EX) will then perform some operation like an addition, multiplication or comparison on these two registers contents. Then, if were storing or loading values between the registers and the RAM, the memory access (MEM) stage will handle it. Finally, most of the time the result will be written back (WB) to another register so its ready to go for the next operation.

Courtesy of Wikipedia.org

The Need For Speed


Okay, so the setup was a little complicated, but now that its all in place we can sit back and appreciate the advantages of pipelining:

Speed: Since each worker has just one simple task to do, that means they can get really good at it and operate at ninja speed. Unfortunately it also means that the work is mundane and unfulfilling, but then if we got robots to do it people would just complain that their jobs are being stolen away, so what are you gonna do Parallelism: The work has been split up into tasks of roughly equal length, which means that workers should rarely be twiddling their thumbs as they wait for another job to finish. We call this a balanced pipeline and it means everyone is working simultaneously, as shown in the image above. This also means that tasks will reach completion at regular intervals, with shorter delays between them.

The best part is that it works even better on an actual CPU:

Scalability (Clock Rate): The pipelines performance is directly proportional to the processors clock speed, since an instruction is completed every clock cycle. This means that performance improvements are just an overclock away, and it explains the crazy trend of Intels ever faster CPU clocks in the 90s. Scalability (Pipeline Stages): Theres nothing stopping us from coming up with clever ways to divide the work into even more, smaller stages, so long as they remain roughly equal in length. That would mean wed need more workers, but they would each do less, and so the whole pipeline would run faster by reducing the average delay between completed instructions. Intels last Pentium 4s had a 31-stage pipeline!

. Recall that were trying to optimize the workings of an auto plants assembly line. To this end, weve divided the process of assembly into five stages, one for each worker, such that they can run in parallel and improve the systems overall efficiency. This is called pipelining and it hinges on the idea that each worker has only a single, simple task to do at any given time, before starting the next one. Since these tasks are short and simple, they can (and should) be executed as quickly as possible. The best to avoid the whole plant becoming a hectic mess is to have clear and explicit instructions detailing exactly what needs to be done at each moment. In fact, that was the very first stage of the pipeline we covered last time, the Instruction Fetch or IF. The worker filling this role of instruction fetcher is therefore in charge of maintaining the master list of instructions and making sure all the steps in the construction are done in the right order.

Awaiting Further Instructions


Fair enough, you might say, so theres some car designer somewhere that writes a list of instructions on how to build a car and then faxes the plant a copy and everything else is gravy. Well, sure, thats about right, but that also glosses over a couple of things First is the fact that the head office writing up these instructions is in Germany, but our particular plant is in China, as stereotypes would allow. Which means it needs to be translated into arguably the hardest language to learn, but thats a story about Assembly Programming for another time. Second, and far more importantly, is the fact that we don`t know what the workers in our particular plant are capable of. I mean, sure, we know that they have the general skill set and

tools necessary to build a car, but are they capable of understanding and completing each and every instruction we send them? The workers have different things to do depending on the current instruction, and so we want them to have enough training that they know what to do in each case. We dont want to have to micromanage each employee at each instruction, we just want to tell everyone in the plant to mount the engine and then assume they know exactly what to do. This makes the job of the designer writing the instructions much easier, since he can just write a single high-level command and then know that it will be carried out correctly. Even better, he doesnt really need to know anything about this specific auto plant, only that they are capable of carrying out such a command. That means that so long as all the different auto plants all over the world have the same capabilities, we dont really care how they are executed internally! Thus, that means we can send the same exact instruction manual to every plant all over China, and even if the exact internal implementation of each plant is slightly different (for example, one of the workers is a robot), the end result (the cars they produce) will be the same. What were describing here is the idea of an abstraction. In other words, the auto plant, to the designer, is just a black box that when you give it instructions (and parts) will produce cars. The workers of the plant simply have to tell the head office what instructions they are capable of, and this forms their interface, which is the only thing visible to the designer. This set of instructions they are capable of carrying out is aptly called their instruction set, which is all of the functionality that they provide. Its effectively the basic building blocks, since you can do much more complex things by simply combining multiple commands in clever ways.

A Simple Example
So then, what sort of instruction set does a typical auto plant provide? Well, there are many ways to get fancy and add extra functionality to our auto plant, but lets stick to just the basics, which are sufficient to get a car built from a heap of parts, and thats all that really matters. The easiest way to think of all the necessary instructions an auto plant needs to provide is to think of all of the things that can go wrong during the assembly:
1. Load: If we need a part that isnt currently on the shelf, we need to run to the backroom and get it. 2. Store: If the shelf is full, we need to make room, so we should pick a piece that wont be needed for a while and go store it in the backroom. 3. Add: The easy one, the simple act of attaching a piece to another, and then bringing it back to the shelf since well likely add to it again soon. 4. Compare: Sometimes we need to check if a piece is going to fit before installing it, and well have to follow alternate instructions if it doesnt. 5. Branch: When we need to follow alternate instructions, either due to an incorrect piece as above, or because we need to repeat a certain step several times, we simply jump to the new location in the instructions and resume work from there.

IRL

Just as the car designer writes instructions for the workers to follow, programmers write code (instructions) for the computers (the auto plant and its workers) to follow:
1. Load: Load some data from the RAM into a register. 2. Store: Free up a register by storing its data back into RAM. 3. Add: Add two pieces of data together. This could also be other common math operations like subtract, multiply, divide, shift, etc. 4. Compare: Check to see if one piece of data is bigger or smaller than another. 5. Branch: Jump to a new location in the code and continue executing from there. There are also conditional branches that will jump only if a certain condition is met.

And even though it all looks incredibly simple, this forms the very foundation of all computing. Of course, in reality there are a few more instructions available to us, just take a look at this relatively simple MIPS instruction set. But the concept is still broken down into three categories: data transfer (load and store), arithmetic and logic (add and compare), and control flow (branch). And these basic math operations allows us to do literally anything, just look at your smartphone. This is also why, if youve been following the growing debate on software patents, our industry is increasingly averse to the idea that basic math can be patented. Because all software boils down to these basic math operations, its not a question thats even open to debate. Granted, this basic math is buried under layers upon layers of advanced tools that weve built up over the years to make our jobs easier, but thats what makes it all the more amazing. Weve gone from punching holes into paper cards just to add two number together, to creating websites in a few hours (just look at this one)!

Onwards
Anyways, enough teary-eyed reminiscing, lets not get ahead of ourselves. The instruction sets weve covered today give a programmer (car designer) a glimpse into what the computer (auto plant) is capable of, and thats a great start. But its still a bloody pain to have to write out exact and explicit instructions in machine code (Chinese (sorry I dont mean it that way)). So, the next thing I want to cover is the first tool on our way to advanced programming languages, Assembly, a low level-programming language that is almost machine code, but allows you to write in your native language (English or so) by translating it afterwards.

Now, whenever these designers sat down and started writing a set of instructions on how to build a new car, they could simply write in the native language using words they were comfortable with. This meant that the instruction manuals now became much more legible, so it would be much easier to have a coworker review it and check for mistakes before finalizing it. Then, whenever the manual was done, the design team would simply ship it off to the translators and dust themselves off, their job completed. The process of translating the document into the plants native Mandarin and shipping it there would now be taken care of entirely by another team, making the process more efficient, more transparent, and less error prone.

Or Rather, Assemblers
This translation process is just like a piece of computer software known as an Assembler. Processors will only understand commands written in binary (1s and 0s), which is incredibly painful for any normal human to read and write. Programmers initially wrote code using just these binary commands, but their brains quickly melted and so they decided to smarten up the process. Assemblers were created, which would allow a programmer to write commands in normal English words (ADD, LOAD, JUMP, etc.) known as assembly. This means that now such assembly commands are automatically translated into binary code that the machine can actually run. Here is an artists rendering of the difference:

Movin On Up
Granted, assembly isnt quite like reading a book or a magazine, but its a big step in the right direction. In fact, we can improve the picture above to better visualize just where the Assembler sits in the programming toolchain:

However, were still a ways from the advanced programming languages we use today. Assembly is handy and all, but its still a pain to have to give explicit commands to the CPU for exactly what needs to be done, including memory management! The future, as we conveniently know it, lies in creating programming languages that simplify common operations by making them look even more like our native English language, as well as creating macro commands that execute many different assembly statements in just a single line of code. Allowing the user to type what vaguely resembled words rather than arbitrary codes (Assembly Language vs. Machine Code, as shown below) was a huge jump in usability and productivity.

Like we explored last time, this is analogous to the car designer being able to write his instructions in his native language (German). So, hes able to work more comfortably and then have a team of translators convert it to the correct language for the manufacturing plant (Chinese). Sure, it takes time and money to do this, but because the designer can now work much faster and more comfortably, the ultimate result is a better, nicer and more advanced automobile.

But We Can Do Better


Okay, so Assemblers are certainly a step in the right direction, the instructions are much more legible and everyones happy that better cars are being produced as a result. But once the novelty wears off and you start getting used to your new tool, its clear that some annoyances still remain
Manual space management

For one, as were writing the instruction manual, we might start to notice some patterns in the way the more common instructions are written. Take for example the process of attaching the hood, the trunk lid, or the doors to the car. If you recall part 3 of this series, were constantly writing instructions like this:
1. 2. 3. 4. 5.
LOAD "hood" in shelf bin #101 LOAD "attachment bolts" in shelf bin #102 LOAD "attachment nuts" in shelf bin #103 ADD #101, #102, #103 to "car" STORE result "car" for later

In other words, were manually controlling the plants storage space (as explained in part 1) by telling the workers exactly when to bring a part from the back-store to the shelf because theyll need it, or when to put it back because were done with it. This is, quite frankly, ridiculous when you think about it. That means we need to know the exact specifications of the auto plant were writing to, so we dont accidentally make the workers run out of space because the shelf is smaller than we thought. That also means were wasting time

writing very specific instructions when in reality theyre pretty obvious; we could just have someone else convert it for us like we did with the translators last time. So thats exactly what were going to do. Were going to hire a new team of people and call them converters, and theyre going to transform the written words (in German) of the designer into the more specific intermediate instructions (still in German but more verbose) which get handed off to the translators before being shipped to the plant (in Chinese). This will allow the car designer to write at a higher level, worry less about the details of space management, and ultimately be more productive. For example, the instructions given above dont need to be written as five individual instructions (LOAD, LOAD, LOAD, ADD, STORE), its just as understandable if we write something like this:
1. AttachToCar(Hood, using Bolts, Nuts)

All of the necessary information is contained within that one single instruction, and anything else like storing it afterwards is strongly implied (you werent gonna just throw out all that hard work were you?). Even details like the shelf bin numbers dont need to be explicitly written because they can be figured out. This basically leaves it up to the team of converters to use the shelves as they see fit, because fundamentally it doesnt matter what bin on the shelf is used so long as the car actually gets built correctly. And since theres only one set of bolts and nuts that fits the hood anyways, its perfectly feasible for them to work their magic by just choosing whatever makes sense. Leaving the specific details to them means we can focus on the bigger picture.
External instructions

Another problem with the old instructions we were writing is that they sometimes get incredibly repetitive. Lets say that you as the designer are putting the same exact engine in four different models of car. Does it really make sense to be copy-pasting identical engine assembly instructions into each of the instruction manuals? Firstly, thats an awful lot of matching text to be repeating across four different manuals, and secondly, if you made a mistake, youll have to fix it four different times! So, why not save a few trees by just writing an external instruction manual about this particular engine, and that way you can just refer to it directly in each cars manual. In this way, you as the car designer can nonchalantly write now just build engine #001 lol in the middle of the cars instruction manual. Then, when youre handing it off to the converters, just include a copy of the manual for building engine #001, and theyll take care of bringing it all together into one complete set of instructions to be sent to the plant.
Instruction Analysis

Now that this conversion process has been put in place, thanks to the problems above, and we have a team of people to carefully read over the code, we might as well maximize our use of them. Its really easy to make mistakes when writing instruction manuals, so they might as well be proofreading for us.

The mistakes were most likely to make as designers come from the category of things that make no goddamn sense. For example, we might write in step #12 to attach the engine, when in reality it hasnt been built yet because thats actually in step #15. With low-level instructions, we might assume the engine is already in shelf bin #101 and accidentally write an instruction to attach the engine like this:
1. ADD #101 to "car"

So, because were doing manual space management and accessing bin numbers directly, a worker would end up reaching into shelf bin #101, pulling out a tire, and having no idea what to do next as he wonders what kind of idiot wrote these instructions. Now there are two advantages to having the conversion team around in this case. First, writing in a higher level language means that instead of producing the instruction above (which is unclear because it doesnt tell us whats actually in bin #101), wed be writing something like this instead:
1. Install(Engine, using DuctTape, ChewingGum)

So, because the word engine is explicitly listed, its much easier to notice the mistake at a glance and prevent it from reaching the converters. But lets say that were having a rough day and we dont notice before sending it off Were we to hand off such faulty instructions to the converters, they could easily proofread it and notice the mistake themselves. Even if they didnt see it right away, because its their job to figure out the best way of using the shelf space now, sooner or later theyd notice that the bin was not being filled, the mistake would surface and a catastrophe would be avoided.

Assemblers on Steroids

The team of converters, as weve outlined them above, is directly analogous to modern code compilers. They essentially fit above the Assembler in the stack, as shown below.

They eliminate even more tedium from the lives of programmers so they can focus on getting things done. More specifically lets focus on the three big ones we covered above in Analogyland.
Register Allocation

First, where working in Assembly requires the programmer to manually manage individual registers, compilers were specifically built to take care of it themselves with a technique called register allocation. This way, the programmer doesnt have to worry about loading or storing values into low-level memory, all of that complexity is hidden away so that he (or she, come on now) can treat everything as being readily accessible immediately. This leads to code that is much simpler, much shorter, and much easier to read and write. Also, because this hides the specific implementation of the current computer from the programmer, this allows for code to become portable across many machines. Granted, this means that youll need a new compiler for every different instruction set (part tre) you wish to target, but it nonetheless allows programmers to save a lot of time by not having to worry about what specific type of processor the code is going to run on.
Linkers

Second, our new best friend the compiler brings along his buddy called the linker to help in the fight against programmer tedium. While not strictly a part of the compiler, the linker takes the compilers low-level code output and joins it with whatever other libraries have been referenced to form a single executable file. So, just like the car designer can refer to an external engine manual in his instructions provided he attaches it, the programmer can refer to an external library

so long as its stored somewhere nearby on the computer. The linker will grab whatever it needs from the library and smash it all together into a single executable for ease of use. This allows code to be written much more succinctly, as it eliminates the need for repetition across programs.
Code Analysis

Third, because compilers inherently needs to read your code, another helpful feature they bring along is the ability to perform code analysis for the programmer. The easy first one is errorchecking, as anything that doesnt make sense will give the compiler trouble when trying to produce machine code. So, itll stop the compilation and report an error to the programmer so he can fix things up and have better luck next time. But since the compilers getting intimate with your code, it might as well give it some more advanced analysis. The next big one is performance analysis so that the compiler can automatically remove dead code, or remove instructions that recalculate the same exact number over and over, for example. Furthermore, given that its aware of the target machines technical details, it can also perform platform-specific enhancements that go beyond the obvious ones outlined earlier. Granted, this means that a lot of work must go into ensuring the compilers correctness, but once its in place, free* performance improvements are nothing to sneeze at.
And More

Finally, note that a compiler does a lot more than just the three things outlined above, and you can read more about it on good old Wikipedia, or in this informative slide deck. But those three are pretty big ones and serve to give you some appreciation of the work that went into designing compilers over the years. Also this post has grown into an overly long abomination, so here, lets keep you entertained.
cat_computer.jpg

Up, Up and Away


At last, weve gotten to a point where written code actually resembles English thanks to compilers, not to mention that they bring many other improvements to the table with them. Apart from newfangled visual programming shenanigans, compilers are effectively the top of the food chain when it comes to programming tools (Note that interpreters are also very similar for the purposes of our discussion).

Analogies for Computer Security

Firewalls are like guards that check the identification of each network packet that traverses the virtual front gate.

Network Intrusion Detection Systems (NIDS) and anti-malware software are like TSA personnel at an airport, looking for dangerous items and suspicious behavior. Security permissions are like locks that control physical access.

This sounds about right, doesnt it? In the physical security world; locks, fences, guards and roaming patrols equate to a real sense of security. Unfortunately, computer security analogies along these lines are an oversimplification that can lead people into believing that basic computer security measures (firewall, NIDS, antimalware software and permissions) actually prevent hackers from breaking into systems. Here are modified analogies that are a bit more accurate:

Firewalls make sure that everyone entering a facility or area is wearing a shirt and footwear. As long as a person meets this criteria, the person can enter the facility or area. NIDS and anti-malware are looking for people dressed in black, wearing a ski mask and carrying a crowbar, bolt cutter or blow torch. Everyone else that doesnt fit this description is allowed to pass. Security permissions (locks) keep honest people honest. Criminals bring tools to bypass the locks. MAC addresses are essentially the road to the destination no its just the vin number of the vehicle ech and every network adapter has a unique number , this number is the mac address IP address is kind of like a map to the destination there are 2 types of mac addresses wan ip address and lan ip address wan ip address identifies you or your connection / modem / router to the www lan ip address identifies individual computers etc within your local and private network they are separated by the NAT and router that adds and subtracts info so that the correct info ends up at the correct private ip address think of the router as a traffic cop and ensures this info goes to the right ip address and no others Internet Protocol can run on top of that, in layer 3 the network layer. This allows each person to be given an IP address. This is like a street address and based on where the sender is, it encapsulates (i.e. puts data similar to putting a letter in an envelope) within a packet and sets a destination IP address. Through routing, the packet can find its way to the destination through a series of routers, which have next hops for ranges of IP addresses. As has been alluded to, there are public and private IP addresses. There aren't enough IP addresses to give every device a unique IP address, so a few ranges of IP address have been setup and defined for private use. What this means, is that private networks can

reuse these same addresses for their own purposes. i.e. They aren't for the public internet it is just for the use of private networks (i.e. a company or home network). The question then becomes, well how do you connect those private networks to the internet this is where "Network Address Translation" comes in on a router. The Internet operates on the IP addresses which don't fall into that special private range. That means, any other public IP address can be routed to across the world, because the routers know where to send the packet to get there. So you implement a router with NAT, which has a public IP address (so it can be found on the internet). On the other side of it, it your private network. Through some special port mapping, it means that anyone can send data to your network the router remembers which device requested which packet, and can send it to he right device even though they have been all sent to the same public IP address. In other words a router with NAT, can link the public internet with private networks. Routers operate on layer 3 i.e. the traffic lights for information via IP address. Switches operate on layer 2 they don't know much about IP addresses at all (ignoring special switches here) but remember MAC addresses and which port, which mac address is on. pete y testing writes... for the needs of the OP its correct No its not IP (Internet Protocol) addresses, as you referred to, have nothing to do with MAC addresses. An IP address is nothing other than a layer 3 address. If you are referring to LAN and WAN IP addressing it works much better in relation to private and public IP addressing respectively. A car analogy, in my opinion, could really help to understand the concept behind the mentioned types of processors. Think about each of the CPUs as a different brand of a vehicle on a luxury scale. Core i3 processor would then be your trusted, reliable Honda. It is very basic, delivers great performance, you can count on it to get the job done, but there is just not enough bling. Core i5 would be, lets say, a Mercedes. It does everything its fellow Core i3 can do plus some. You wont have a reason to wish it had more power unless you wanted to take it to a race track. Core i7 is a Ferrari of the CPUs. It is reliable, luxurious and extremely fast. It sets a high standard for the rest of the processors, no questions asked, it delivers. But will you be able to use the power it has to offer? It might be nice to drive a Ferrari to work every day, but whats the fun, when you cant go over 45 mph?

Which CPU Is Right for You?


Going back on track to CPUs now, lets explore what kind of work you can do with each of the processors, so that you could get one that is just right for you.
Core i3 Core i5 Core i7

Intel CPU Performance Turbo Boost

Entry-level Mainstream High-end No Yes Yes

Intel CPU Cores 2

Core i3 4

Core i5

Core i7 4 Yes 8 MB

Hyper-threading Yes Cache 3-4 MB

No 4-6 MB

Core i3 processor is considered an entry-level CPU that can efficiently perform anything an average user can throw at it. Core i3 allows you to perform basic tasks with no issues, but at a faster speed than tablet or a netbook. It is great for browsing the web, email, watching video, and running basic office applications. If this sounds like what you are normally using your computer for, I recommend to check out most popular Core i3 CPUs on Amazon. There is a sorting menu in a top right corner I always use to quickly find what I need. Core i5 CPU brings your computer to another level of performance. If you need more computing power for media creation, video transcoding, photo editing, Core i5 processor will live up to your expectations. Multi-tasking, switching between multiple programs are handled better by an i5 thanks to its Turbo Boost feature. In short, it is a capability of the processor to recognize the extra cores that are not occupied by another task and channel their power to work on the task that needs to be done (similar to overclocking), so that it could be completed faster. If Core i5 is the CPU you are looking for, Amazon, in my opinion, is a great place to explore your options. Finally, Core i7 is considered a high-end processor that is perfect for doing graphicsintensive work and running increasingly demanding applications. When I think Core i7, I think video-encoding, rendering, and 3D modeling. Core i7 CPUs have four cores and Turbo Boost, just like Core i5 processor, but its speed is magnified by the use of Hyperthreading technology. What that means, the operating system sees two processor instead of one by creating a virtual core for each physical core. This way, the workload can be shared between a greater number of cores, therefore, completed faster.

Oddly enough, even professionals who already work with UMTS-WCDMA and LTE networks have trouble to fully understand the concepts of RRC and RAB. And without this initial understanding, hardly they can evolve with clarity and efficiency in their daily work. Let's start imagining the following scenario: two people are cut off by a cliff. On the left side, a person (1) want to buy some things that are for sale in a store (2) or deposit on the right side. In the right side, in addition to the deposit, we also have a seller (3), which will help the buyer to contact (negotiable) with the deposit.

Let's continue with a possible solution: the buyer on the left write his request in a note, tie on a small stone that he found on the floor, and send (1) it to the seller on the other side. So, the stone carry the information or initial request. The seller receives the request, but she need to send it to the deposit, in order for the shopping to be sent. She sends the request on a remote control car (1), which run a previously demarcated path to the deposit.

Some time later, the deposit response arrives to seller (1), which then checks to see whether she will be able to send the data or not.

So that we can proceed with our call, let's consider a positive response. That is, what the buyer is willing, or the 'resources' are available. Seller realizes that to fulfill the request, and be able to send the purchases, she will need to build a 'path' (1) between the two ends of the cliff, so the wagons could carry over with the

orders/receipts and purchases. Then, the seller uses some of its iron bars and creates a link between the two sides.

Once established all the way between those involved, requests can be sent from both sides as well as the purchases or any other information can be transferred by different paths and wagons/cars!

If you managed to understand how the above problem was solved, congratulations, you just understand how the most common form of UMTS-WCDMA and LTE communication happens! Although analogies are not perfect, it help us a lot to understand the complex functioning of these networks, especially in relation to new concepts such as RRC and RAB, but also a very often used, the 'bearer' for each 'bearer' we have several associated parameters, such as the maximum delay and packet loss limit and these attributes that make sure each packet going in the same channel have the same QoS attributes. Note: If you manage to understand the concepts that will be explained in the figure below, you will be with a great base for both WCDMA and LTE networks. This is because, in order to

facilitate we use WCDMA nomenclatures, but the principle is pretty much the same in LTE. Just do the equivalent replaces, like NodeB for eNB.

On that ficticious scenario, the seller is the UTRAN, responsible for creating and maintaining the communication between the UE (buyer) and CN (deposit) so that the QoS requirements of each are met.

UTRAN: UMTS Terrestrial Radio Access Network o NodeB o RNC UE: User Equipment CN: Core Network o MSC: for switched voice services o SGSN: for packet-switched services

The cliff is the Uu Interface between the UE and the UTRAN, and the road through the remote control car goes until the deposit is the Iu Interface, between the UTRAN and CN.

Sending requests and receipts is part of signaling, or the RRC. The shipment of purchases is the data part, or the RAB. In our scenario, the RRC are the Rails, and RAB is the full service of sending data between the UE and the CN.

RRC: Radio Resource Control RAB: Radio Access Bearer

Note: the RRC is in Layer 3 - control plane, while the RAB occurs between the UE and CN, in the user plane. The railcars are the RBs, and convey the information in the radio path. These wagons define what type of thing will be transported, and in what quantity. Similarly, the RBs define what type of data will in the RRC, which can be Data or Signaling. When the QoS attributes change, then the Rbs associated with that RRC connection need to be reconfigured. The remote control cars are the Iu bearer, and carry information on Iu Interface (between the UTRAN and the CN), either CS or PS.

RB: Radio Bearer Iu bearer: Iu Bearer Interface

Note: RAB is the combination of RB and Iu bearer. The RB is a layer 2 connection between the UE and the RNC, and can be used for Signalling and control User Data. When it is used for Signalling or Control Messages is called SRB. And when it is used for user data is called TRB.

SRB: Signalling Radio Bearer (Control Plane) TRB: Traffic Radio Bearer (User Plane)

A RRC connection exists when an UE performs the call establishment procedure, and get resources from the UTRAN. When a RRC connection is established, the UE will also get some SRBs. (If for some reason the initial request is not accepted, the UE can make a new request after some time). Since the SRB was established between the UE and the CN, the RNC checks a series of information such as the UE identity, what is the reason for the request and whether the UE is able to handle the requested service. The RNC that maps the requested RABs into RBs, to transfer between the UE and the UTRAN. In addition it is also check the attributes of the RABs: if they can be met by the available resources, and even whether to activate or reset radio channels (reconfiguration of lower layers services ) based on the number of Signaling Connections and RABs to be transferred. This way, it creates the impression that there is a physical path between the UE and the CN. Remembering again that no matter how many signaling and RABs connections there are between

the ue and the CN - there is only a single RRC connection used by the RNC to control and transfer between the UE and the UTRAN. Now that we have seen a lot about RRC and RAB, let's learn only a few more concepts today after all, we already have enough information presented. Let's talk about the AS and NAS.

AS Access Stratum is a group of specific protocols of access network NAS NON Access Stratum: so, are the other protocols, or those that are not access network

At this point of view, the AS provides the RAB to the NAS, or information transfer service. The UE and CN need to communicate (events/messages) with each other to perform several procedures with many purposes. And the 'language' of this conversation between them is called protocols. The protocols are then responsible for allowing this conversation between the UE and CN, and cause the CN do not worry about the method of access (be it GSM/GPRS, UTRAN, LTE). In our case the RNC acts as a protocol - between the UTRAN and CN. According to what we learned today, the RAB is carried:

Between the UE and the UTRAN: within the RRC connection. The RRC Protocol is responsible for negotiating the (logical) channels of Uu and IuB interfaces, and for the establishment of signaling dedicated channels as SRBs and RBs among these interfaces. Between the RNC and the CN: after being negotiated and mapped, in the RANAP protocol connection, through Iu interface (CS/PS). o RANAP: Radio Access Network Application Part

As we have seen above, the RNC maps requested RABs into RBs using current radio network resources information, and controls the services of lower layers. To optimize the use of these resources, as well as the network band and physical resource sharing between different entities, the UTRAN can also perform the function of CN messages distribution. For this, the RRC Protocol transparently transfers messages from CN to the access network through a direct transfer procedure. When this occurs, a specific indicator of CN is inserted in these messages, and the entities with the distribution function in RNC use this same indicator for direct messages to the appropriate CN, and vice versa. But now it started to get more complex, and we have already reached our goal today, which was to learn the basics of RRC and RAB. Everything we just talked about above can be seen again in the same figure below, the same from the beginning of the explanations.

RRC and RAB in GSM?


Okay, we understand how RRC and RAB works in UMTS-WCDMA and LTE networks. But in GSM, does we have these concepts as well? At first, the answer is NO. However, with what we learned today, we can make a comparison with some GSM 'equivalent' parameters. We can compare the SDCCH phase and TCH phase of a GSM call with RRC and RAB in UMTS. RRC is the Radio Resource Control that works as Control Plane in Layer 3. Is used primarily for Signaling in UMTS. Then we can compare with the signaling in GSM, as the Immediate Assignment process for SDCCH resource allocation. RAB is the radio access 'transporter' that works as the User Plane to provide data for the services requested by the user. Then we can compare with the user part in GSM, as the TCH Assignment.

For each service requested by the user we have only 1 RAB. For example, if the requested service is a Voice Call (CS-AMR), then 1 CS RAB will be generated and provided to the user. The same is true for PS. So our equivalence table would be: UMTS / LTE RRC Connection RAB Assignment (RNC-CN) GSM Immediate Assignment Assignment (BSC-MSC)

Control User

RRC Connection and RAB example


To complete for today, let's see (always in simplified form) a simple RRC connection and RAB. Whenever the UE needs the UTRAN resources, he asks. So that these resources are allocated, it establishes a RRC connection with some SRBs. In this case, a RAB connection is created to enable the transfer of user data. We remind you that the RAB consists of RB + Iu bearer. The RAB is created by CN, with a specific QoS request. For a single UE, there may be multiple RAB for NAS service (CS or PS). But let's just stick to the initial procedure, that is, how is performed the 'RRC Setup' procedure, from the UE's request. The following figure shows this more straightforward.

The RRC has always 3 steps: 1. The UE requests a new connection in the Uplink (RRC CONNECTION REQUEST); 2. With sufficient resources available, the 'RRC Downlink CONNECTION SETUP' message is sent, including the reason, along with the SRB configuration; (Note: otherwise, if the RRC connection cannot be established, the message sent is 'RRC CONNECTION SETUP REJECT'). 3. If all goes well, the UE sends the message in the Uplink: RRC CONNECTION SETUP COMPLETE. And after this, the MEASUREMENT CONTROL message are being sent in the Downlink, for the communication continuity. After the RRC connection is established, the UTRAN makes the checks between the CN and the UE, for example the authentication and security operations. And so, the CN informs the RAB to UTRAN in accordance with requirements of the service requested by the UE. As we have seen, RAB occurs after the RRC, and without a RRC connection no RAB may be established.

Error Checking and Correction using Cyclic Redundancy Check


We start talking about errors. Errors are possible, and mainly due to the transmission link. In fact, we can even 'expect' errors when it comes to Wireless Data Transmission.

If we have errors, we need to take some action. In our case, we can divide it into two steps: error checking and error correction. Error checking is required to allow the receiver to verify that the information that arrived is correct or not. One of the most common methods of error checking is the CRC, or 'Cyclic Redundancy Check', where bits (CRC) are added to a group of information bits. The CRC bits are generated based on the contents of the information bits. If an error happens with the information bits, the CRC bits are used to verify and help recover the degraded information. The level of protection provided is determined by the ratio: number of CRC bits by the number of information bits. Above a certain error level, the process is eliminated. CRC protection is used practically in all existing Voice and Data applications Minimizing the number of retransmissions we ended up having a more efficient data flow result, including - mainly - the 'Throughput'. In simplified way: the CRC lets you know if a package arrived 'OK' or 'NOT OK'. Every packet that is sent has a CRC, or a 'Signature'. As an analogy, it's like when we send a letter to someone, and in the end we sign: 'My Full Name'. When the other person receives this letter (information), he checks the signature: 'My Wrong'. In this case, he tells the Messenger: 'I don't know 'My Wrong', this information has some problems. Please ask sender to send it again!'. I.e. I do CRC checks. If the CRC is 'wrong', the information is 'wrong'. If the CRC is 'correct', probably the information is 'correct'.

Retransmissions
Retransmissions are then: send information again (repeat) to the receiver, after it make such a request. The receiver requests that the information be retransmitted whenever it cannot decode the packet, or the result of decoding has been an error. That is, after checking that the information reached the receiver is not 'OK', we should request it to be retransmitted.

Of course, when we have a good link (SNR), without interference or problems that may affect data integrity, we have virtually no need for retransmissions. In practice, in real World, this is very difficult to happen, because the links can face the most different adversities. Thus, an efficient mechanism to enable and manage the retransmission is essential. We consider such a mechanism as efficient when it allow data communication in a link meet quality requirements that the service demands (QoS). Voice for example, is a service where retransmission does not apply. If a piece of information is lost, and is retransmitted, the conversation becomes intelligible. On the other hand, data services practically rely on retransmission, since most have - or allows a certain tolerance to delays some more, some less. With the exception only for 'Real Time' services. But it is also important to take into account that the greater the number of needed retransmissions, lower the data transmission rate that is effectively reached: If the information have to be retransmitted several times, it will take long for the receiver to obtain the complete final - information.

ARQ
Till now we talked in a generic way about data retransmissions, error checking and correction. Let's now see some real and practical schemes. The simplest way (or more common) control using what we described above is known as ARQ, or 'Automatic Repeat Request'.

In ARQ, when we have a 'bad' package, the system simply discards it, and asks for a retransmission (of the same package). And for this, it sends a feedback message to the transmitter.

Unfortunately we don't have much to do about the link conditions. Or better, we are able to improve the links performance, for example with configuration parameters optimization, but we'll always be subject to face adverse conditions. In this case, our only way out is to try to minimize retransmissions. And that's where arise other techniques or more 'enhanced' schemes for retransmission. The main one is HARQ.

Hybrid ARQ (HARQ)


The HARQ is the use of conventional ARQ along with an Error Correction technique called 'Soft Combining', which no longer discards the received bad data (with error). With the 'Soft Combining' data packets that are not properly decoded are not discarded anymore. The received signal is stored in a 'buffer', and will be combined with next retransmission. That is, two or more packets received, each one with insufficient SNR to allow individual decoding can be combined in such a way that the total signal can be decoded! The following image explains this procedure. The transmitter sends a package [1]. The package [1] arrives, and is 'OK'. If the package [1] is 'OK' then the receiver sends an 'ACK'.

The transmission continues, and is sent a package [2]. The package [2] arrives, but let's consider now that it arrives with errors. If the package [2] arrives with errors, the receiver sends a 'NACK'.

Only now this package [2] (bad) is not thrown away, as it is done in conventional ARQ. Now it is stored in a 'buffer'.

Continuing, the transmitter send another package [2.1] that also (let's consider) arrives with errors.

We have then in a buffer: bad package [2], and another package [2.1] which is also bad. Does by adding (combining) these two packages ([2] + [2.1]) we have the complete information? Yes. So we send an 'ACK'.

But if the combination of these two packages still does not give us the complete information, the process must continue - and another 'NACK' is sent.

And there we have another retransmission. Now the transmitter sends a third package [2.2]. Let's consider that now it is 'OK', and the receiver sends an 'ACK'.

Here we can see the following: along with the received package [2.2], the receiver also has packages [2] and [2.1], that have not been dropped and are stored in the buffer. In our example, we see that the package arrived 2 times 'wrong'. And what is the limit of these retransmissions? Up to 4. IE, we can have up to 4 retransmission in each process. This is the maximum number supported by 'buffer'.

Different HARQ Schemes


Going back a little in the case of Conventional ARQ, whenever we send a package and it arrives with problems, it is discarded. Taking the above example, when we send the package [2], and it arrives with errors, it is discarded. And this same package [2] is sent again. What happens is that we no longer have the concept of 'package version' - [2.1], [2.2], etc. We do not have the 'redundancy' version, or the gain we get in HARQ processing. To understand this, we need to know that information is divided as follows: [Information + Redundancy + Redundancy] When we transmit the packet [2] we are transmitting this: [Information + Redundancy + Redundancy] When retransmit the same package [2] we are retransmiting it again: [Information + Redundancy + Redundancy]

But when we use HARQ, and retransmit packet [2.1] or [2.2], we have the possibility of:

Or retransmit that same information again; Or retransmit only the redundancy.

And then, if we retransmit less information (only redundancy), we spend less energy, and that will run much faster. With this we have a gain! That is, we work with different 'versions of redundancy', that allows us to have a gain in the retransmission. This is called 'Redundancy Version', or what version of redundancy. The redundancy version, or HARQ scheme with 'Soft Combining' can be 'Chase Combination' or 'Incremental Redundancy'.

HARQ Chase Combination

Chase Combination: when we combine the same information (the retransmission is an identical copy of the original packet). We transmit an information, which arrived wrong, and we need to do a retransmission. We retransmit the same information - and there we don't have much gain.

HARQ Incremental Redundancy

Incremental Redundancy: where we retransmit only the portion that we didn't transmitted before. Thus we retransmit less information. Less information means fewer bits, less energy. And this gives a gain! Redundancy bits are retransmitted gradually to the receiver, until an ACK is received. With this, we adapt to changes in the condition of the link. The first retransmission can, for example, contain or not bits of redundancy. If necessary, a small number of these bits is retransmitted. And so on.

Finishing for today: what are the 2 steps of HARQ? Why it gives me a Gain?

First because from wrong packets 1 and 2 we can get a correct one, since we do not discard erroneous packets anymore. Second because we can - also in retransmission - send less information, and streamline the process.

The use of HARQ with 'Soft Combining' increases the received Eb/Io effective value for each retransmission, and therefore also increases the likelihood of correct retransmissions decoding, in comparison to conventional ARQ. We send a package, and it arrives with errors: we keep this package. Receive the retransmission and then we add or combine both.

HARQ Processes (Case Study)

What we have seen so far clarifies the concepts involved. In practice, in retransmission, this type of Protocol is called 'Stop And Wait' (there are other kinds of similar protocols). What would be: send the information and stop. Wait for the response to send other information. Send, wait for response. Send, wait for response ...

No! Not so in practice. In practice, we work with a number of 'processes', which may vary for example from 4, 6 or 8. The following image illustrates this more clearly.

Other types of HARQ


New schemes are constantly being developed and used, as the type III HARQ, which uses selfdecodable packages. But enter these variations, terminology and considerations, is not the scope of our tutorial, which was simply to introduce the concept of Retransmission, ARQ and HARQ. Based on the key concepts illustrated here today, you can extend your studies the way you want, however we believe that the most important thing was achieved understand how it works and what are all the cited concepts.

8: Network address? The computer's right there


Real-life buildings are a fruitful source of analogies for network address concepts. For example, John explains the difference between static IP and DHCP: "It's like the difference between a block of flats (apartment block) and a hotel. Each has many addresses (flats or rooms) but you only have a hotel room temporarily, whereas you have a flat (apartment) for a long time. What about a hotel guest who stays there for a long time? Well, that's your reservations in DHCP."

Kalmano: "When explaining to students about domain names vs. complete URLs, I tell them that getting the domain name instead of the URL is like being invited to a party and being given the zip code instead of the full address." When it comes to explaining ports, Craigpower1 says, "The analogy I like to use to explain the relationship between IP addresses and port numbers is to say that the IP address is like the street address of an apartment building, and the port number is like the apartment number. The street address gets the 'letter' to the 'building' it needs to go to, and the port gets it to the specific apartment." As for security, Dprows adds, "An analogy I use to describe ports on a router is that the router is a big house with lots of doors. We leave the doors closed unless absolutely necessary, to keep intruders out." The paper ends with a comment on the dangers of misusing analogies and a short discussion of the effectiveness of this teaching technique.

Memory and Ice

An important topic in computer architecture is memory, not least because it forms the basis of the so-called von Neumann machine and is available in a bewildering number of implementations from semiconductorbased DRAM to magnetic disk and optical disks.

We take it for granted that students know what memory is because its a term we use in everyday life. However, the human notion of memory is also misleading in several crucial ways.

I introduce computer memory by means of analogy. The analogy I use is ice. Why? The ice on a pond represents a form of memory because the ice remembers that it has been cold even when the temperature rises above freezing point.

An important attribute of any analogy is its exactness or precision. Does the analogy provide a powerful insight into a topic? Is it just a simple means of illustration, or is it largely misleading because the analogy breaks down as soon as you look in any detail? The use of ice as an analogy for memory is, in many ways, quite exact. If you cool water to below freezing, ice forms. If you increase the temperature above freezing, the ice remains (until it melts) indicating that it was once cold. Consider the following:

Water is a two-state binary memory. It is either ice or liquid. It takes an energy transfer to either melt ice or to freeze water. This is true of all memory without the need for an energy transfer, stored data could spontaneously change state. If the temperature is above freezing, ice will eventually melt and the data (i.e., its former frozen state) will be lost. This effect models dynamic RAM where data is also gradually lost unless it is rewritten. Note that it models flash memory too, except that the retention period for flash memory is decades rather than milliseconds. Curiously, ice also models a new form of memory ovonic memory, where data is indeed stored by melting a material within a chip. A pulse of electricity melts the ovonic material. If the pulse has a sharp decay, the material freezes rapidly in an amorphous state, but if the pulse has an exponential decay, the material cools slowly and the material crystallizes. The amorphous and crystalline states have the different electrical properties which makes it possible to determine the state of the cell.

Quantization

Some computer architecture courses include a section on analog signal processing a topic that is of importance in todays world of multimedia. Capturing analog signals requires the introduction of two topics: sampling and quantization. These topics are commonplace in electronics and computer engineering courses, but are less frequently encountered in computer science courses at freshman or sophomore level for students with relatively little background in mathematics.

Quantization can be introduced via dynamic range. I use the analogy of sugar in coffee. When you ask someone if they take sugar, they may say half a spoon. The point is that they could specify the amount of sugar more precisely but that would require more complexity (weighing the sugar or a large number of graded spoons) and most people could not detect small differences in the amount of sugar (demonstrating that the quantization level is related to the nature of the application).

The minimum rate at which a time-varying quantity must be sampled is given by Nyquists theorem twice the rate of highest frequency component in the signal. I introduce this topic by considering the control of swimming baths. A large body of water cannot change its temperature rapidly and students can readily appreciate that sampling rate must be related to the rate at which a signal changes.

Incidentally, the classic analogy used to illustrate the effect of under-sampling used to be the wagon wheel. If you sample a signal at below the Nyquist rate, high frequency signals appear as low frequency signals. Similarly, if you watch a wagon with spoked wheels move on film or TV, you seen the wheels move forward and then suddenly change direction and reverse as the wagon accelerates. The reason for this is simple if the wheel advances by 100 between each frame, you see the wheel rotating. However, if the wheel advances 3500 between frames you see the wheel rotating 100 in the reverse direction. The reason this analogy is harder to use today is not because of any flaw in the logic its because few students have seen wagons on TV or the movies; the western is a genre that belongs to a past generation.

Handshaking

When dealing with input/output techniques, students are introduced to open- and closed-loop data transfers and handshaking. Typically, the explanation involves timing diagrams with a data available signal (open-loop protocols) and both data available and data accepted signals (closedloop protocols). I find it easiest to introduce the topic by analogy to the mail system.

If you send a letter to someone, you assume that they will receive it. If they do not receive the letter, you do not know they did not receive it and they do not know that a letter was sent to them. This is a limitation of an open-loop data transfer. If you wish to ensure receipt of the mail, you can send it advice-of-delivery or recorded-mail. In this case, the recipient signs for the letter and the sender receives confirmation exactly as in a closed-loop data transfer. This action models the closed-loop transfer where the receipt of a data available signal is met by the assertion of a data acknowledge signal.

This analogy is also useful in dealing with the implications of open-loop transfers. You can ask the class how they would deal with the mail problem. Some might suggest that the recipient can send a letter saying that they have not received anything recently (i.e., the concept of a time-out). Another student might suggest that you number the letters you send so that the recipient would notice an out-of-sequence letter and deduce that a previous letter had been lost (i.e., the concept of frame numbering in HDLC transmission systems). Another advantage of this analogy is that it shows that the open-loop data transfer is conservative. You can only send data at the slowest rate that it can be reliably processed. However, with a closed-loop transfer you can send data as soon as you receive an acknowledgement. Similarly, with the advice-of-delivery service you can send your next letter as soon as you know that your last letter was received.

Data setup and hold times

Theres one area where Ive been forced to use analogies. This involves a topic that seems very straightforward to me but not to my students (perhaps its the numeric aspects where students have to perform calculations that cause confusion). Clocked circuits such as memory devices have minimum setup and hold times; that is, data must be present for tsetup seconds before the data is captured and then remain stable for thold seconds after the capture.

The way to illustrate setup and hold times is by means of analogy with catching a train. I ask my students when they have to be at the train station to get an 11.30 train. Most students immediately realize the problem and say about 11.15 because they appreciate they have to read the annunciator to find the platform and then physically board the train before it leaves. This well illustrates the nature of setup time. I have never found a good analogy for the hold time.

Privileged states

When Im about to discuss the nature of privileged states (user and supervisor states) that are associated with user programs and protected mode operating system programs, I begin by asking the class, Whats the difference between going to a supermarket to buy something and going to the bank to get some money? Curiously, not one student has ever answered this rather simple question correctly. The answer is, of course, that when you go to the supermarket, you perform the transactions yourself by loading your cart with products from the shelves. I tell the students you dont go to a bank, enter the vault with a cart and proceed to fill it with bundles of notes from the shelves of the vault.

In a bank you have to go to a teller and he or she carries out transactions on your behalf. Consequently, you are not allowed to perform an improper transaction. Its the same with user mode operations you are forced to request certain transactions of the operating system (e.g., I/O, disk operations) via mechanisms such as traps (operating system calls). These traps behave like the bank teller and act as the only interface between a user mode program and the operating system. Consequently, a user mode programmer cannot carry out an action that would be harmful to the computer system. In a 68K environment, even corrupting the stack would not necessarily crash the system because the operating system maintains its own, privileged stack that cannot be accessed by a user (applications level) program.

Multitasking

In an introductory architecture class, I briefly discuss multitasking, the apparent ability of a computer to execute multiple programs at the same time. Here I use the example of simultaneous chess, where a group of members of a high school or club all play a chess match against a single powerful opponent. The master chess player goes from opponent to opponent making a move at a time. If there are n opponents he, or she makes n moves in the time each opponent makes a single move. This analogy works because it is correct in several respects. First, the chess master is far faster than the individual players. This means that each player has the impression that they have full exclusive access to their opponent; they are not necessarily aware of the sharing. Second, the master has to maintain the status of play of each of his or her opponents in order to return to play. Similarly, in a multitasking system the operating system has to store the state of each task in order to reactivate it.

Interrupts

One of the areas in which the computer world closely mirrors the human world is the interrupt. This makes it easy to teach all the concepts associated with interrupt handling by means of simple analogies. For example, the interrupt in a computer corresponds exactly to an interrupt in real life I tell the students that I might be writing on the board when a student interrupts by asking a question which I answer and then return to the board. This illustrates the need to respond to the source of the interrupt and then return to the pre-interrupt state.

The next step is to explain that if a second student has a question I will ignore it until Ive answered the first students question (interrupt masking); however, if a student falls ill, I will deal with that problem before finishing the first students question. This illustrates the concept of interrupt prioritization.

Finally, I deal with interrupt acknowledgement in the following way. I say that if I am writing on the board I will not see who asked the question. I am aware only that a question has been asked and that it could have come from a finite number of students. I explain that I can respond by asking each student in turn whether they asked the question or I can say Who asked me a

question? and expect one person to answer. These two concepts illustrate polled interrupts and vectored interrupts, respectively.

Associative memory

Few elementary texts introduce associative memory. I find it important to distinguish between human memory which is generally considered to be associative and computer main store memory which is accessed by supplying the address of a specific location.

I often ask a student how old they are. They answer in a surprised tone and I point out that they found that information amongst all the information they store in their brain in very little time and I didnt even need to give them the address of where it was stored in their memory. This demonstrates the nature of associative memory. I clinch the concept of associative memory with an old joke.

A Dutch resistance fighter was giving a lecture in London on his wartime experiences. He explains how he was walking through the Dutch countryside when he was strafed by a Fokker. A young girl in the audience looks horrified and her mother says, Its OK its a type of Dutch aircraft. The speaker looks at her and says, Ja, der Fokker was a Messerschmitt.

This joke aptly demonstrates the associativity of human memory, where information is retrieved in parallel by means of matching stored data against a key. In this case, there are two responses to the key Fokker; one being an aircraft type and the other an epithet.

The ISO model for OSI

Some courses on hardware/architecture include the fundamental concepts of data communications such as protocols, the seven layers of the ISO model for open systems communications, and details of the physical and data link layers. Communications and protocols is also a fruitful area for analogies and can help overcome some of the confusion surrounding the complexities of layered protocols.

Consider an analogy to help fix the nature of the session layer in a students mind. The session layer organizes the dialogue between two presentation layers by establishing, managing and synchronizing the channel between two application processes. This layer provides dialogue control of the type, "Roger, over", in radio communications, and the mechanisms used to synchronize application communications. The session layer resolves collisions between synchronization requests. An example is: "... did you follow that? ... " "... then I'll go over it again."

Consider an analogy that might be used to describe the presentation layer of the ISO model for OSI. A Russian diplomat can phone a Chinese diplomat at the UN, even though neither speaks the other's language. Suppose the Russian diplomat speaks to a Russian-to-English interpreter who speaks to an English-to-Chinese interpreter at the other end of a telephone link, who, in turn, speaks to the Chinese diplomat. The diplomats represent the applications layer process and talk to each other about political problems. They don't speak to each other directly and use a presentation layer to format the data before it is transmitted between them. The Chinese-toEnglish and English-to-Russian translators represent the presentation layer. This analogy illustrates an important characteristic of the OSI reference model. The English-toChinese translator may be a human or a machine. Replacing one with the other has no effect on the application layer above it or on the information transfer layers below it. All that is needed is a mechanism that translates English to Chinese, subject to specified performance criteria.

Operating Systems

A metaphor I use to introduce operating systems (in the context of computer architecture) is the orchestral conductor. The conductor of a great orchestra is an important figure in society; he or she is famous and gets invited on to chat shows. And yet how much music does a conductor make? None. Not a single note.

The conductors value lies in his or her ability to coordinate the activities of the entire orchestra. The conductor knows the strengths and weaknesses of each player and the characteristics of each piece of music. Consequently, the conductor can maximize or optimize the performance of the orchestra and hide any weaknesses due to individual players.

The operating system is in a similar position to the conductor. An operating system does not perform useful computation in the sense that it does not allow you to edit text or play games. However, the operating system knows the structure of the hardware and the tasks to be run and is able to allocate resources to maximize throughput.

The operating system is at the heart of the computer just as the conductor is at the heart of the orchestras performance. Where this analogy breaks down lies in the dual-function nature of the modern operating system. Early operating systems were largely programs that optimized resources by scheduling tasks and controlling hardware resources. Todays graphical operating systems like, Windows, perform the important function of acting as the interface between the user and the computer and its applications. Moreover, some functions that were one user applications have been incorporated into the operating system.

Minor Comparisons

Some analogies are rather limited but serve to make a minor point. The following list provides a few of the examples I have used.

Huffman encoding Information can be encoded by using a variable-length code (i.e., each code word may have a different length). This encoding mechanism is effective when some source codes are far more common (i.e., their probability of appearing at any point in a message is greater than other codes) than others and these have shorter code words. The analogy here is with Morse code which gives frequently-used letters like E short codes and seldom used letters like Q long codes.

Binary representation Binary digits are represented by two states (on/off or high/low). You can easily demonstrate the advantage of binary arithmetic by pointing out that you need only to distinguish between two different states if you used, for example, base ten arithmetic it would require precision electronics capable of discriminating between ten different states. I use the analogy with punched cards (although these are now obsolete) and point out that cards using base ten would require holes in ten different sizes and you have to distinguish between a size six hole and a size seven hole.

Pipelining Probably the mother of all analogies is the analogy between pipelining in processors and the production line. An instruction is executed in an n-stage pipeline and, at any instant, up to n instructions may be in the pipeline. This arrangement is analogous to the production line, where a car is assembled in stages. As the car passes along the production line, it is gradually constructed. This analogy is fairly exact because the same considerations govern the optimum number of stages in a car production plant and in a computer. Moreover, they both suffer from the same problem when a new model of car is created, you have to wait for the current production line to empty. When a processor executes a jump (branch) instruction, you also have to wait for the pipeline to empty.

Cache memory Computers locate frequently used data in a high-speed cache memory. Because of the locality of data, future accesses are likely to access data in cache rather than main store. The analogy is the personal address book where you may have only a few tens of phone numbers, but your next call is likely to be to someone whose number is in the book. However, this is not an exact analogy because it omits many features of the computer cache a human will know whether a name should be written in the note book, whereas the computer automatically puts data in its cache even if it will never be accessed again (cache pollution).

Bus arbitration In systems with buses and multiple bus masters (i.e., devices like CPUs that can request control of the bus) an arbitration mechanism is needed to determine which of several requesting bus masters is to gain control of the bus. I discuss the same problem first in the realm of the bar a lot of people may be at the bar trying to get a drink and the bartender has to decide who gets served next. Then I take the problem to the realm of a computer-controlled nuclear reactor where several devices may be wanting to deal with a problem that might range from a message saying its time to perform a yearly check on a component, to a warning that the reactors cooling pump has just failed. Clearly, these two situations require different arbitration mechanisms. In a bar you want a fairness mechanism to ensure that each customer gets treated in the same way as every other customer and that the customer being currently served goes to the back of the queue. On the other hand, in a safety critical system, some events must be responded to immediately and a prioritization mechanism is required. These real-world analogies allow class discussions of arbitration mechanisms and algorithms.

Scheduling William Klinger [3] suggests an analogy for process scheduling in operating systems that goes beyond my own approach. He combines it with role playing. The students set up a mock fast food restaurant and the students are given food orders by their professor. They then stand in line while the orders are prepared. This provides an opportunity to demonstrate scheduling algorithms by rearranging the order of the students in the line.

CSMA/CD The Ethernet connects several sources to a single cable. If two devices transmit a frame at almost the same time, the two frames collide and are lost. When this happens the two transmitters resend their frames. However, to avoid the damage of repeated collisions, each transmitter backs off for a random period. I use the analogy of two people approaching a revolving door. They each step forward, collide and politely step back. Then they step forward, collide, and so on. Everyone has been in this situation many times. I suggest that the Ethernet solution would require each person to throw a die after the first collision and then wait that number of seconds before advancing. Unless both people throw the same number, there will not be a second collision.

Inappropriate metaphors

Just because someone might use a metaphor doesnt mean that its illuminating or apposite. One of the worst metaphors that appeared in some elementary texts was the term high-speed moron used to describe the CPU. The intended sense was that the computer is fast but not clever. Such a use of moron carries with it the notion of errors, inaccuracy, and inability. It is true that a computer requires a program in order to carry out useful computation, but that is not the same as being moronic. No one would call a five-year old child moronic if they did not understand calculus; just like the computer, the child has to be programmed. In particular, the computer does not make errors in the sense that each of its operations is repeatable and not prone to random errors. If you multiple two numbers together, you always get the same result.

This is a significant point because some of my students do not always appreciate how a computer operates; for example, if I ask, What is the difference between an 8-bit processor and a 32-bit processor, some students will eventually say that a 32-bit processor is more accurate than an 8bit processor. This betrays their understanding of the internal operation of a processor which always gets the same results with the same data and same operations. An 8-bit processor can perform 32-bit arithmetic simply by chaining four bytes; that is, an 8-bit processor can emulate a 32-bit processor.
What is the difference between a compiler and a assembler The "translator" piece which accomplishes this is called a compiler. Note that it is possible to write code without a compiler! In that case, you have to "speak the language of the computer" which means (A) you have to know exactly, in very fine detail, how the machine you are writing for works, and (B) if you want to use this program for a slightly different machine, you have to be willing to adapt your program separately for each kind of machine. Now, there is one significant wrinkle to the story I told above. I said that the compiler translates your

human-readable instructions into machine-readable instructions. That's mostly true, but for some languages like Java, that translation process happens in two steps. First, you translate the humanwritten instructions into something that is "pretty darn detailed" (this is a highly technical term which I just made up, and which I'll abbreviate PDD) but not quite detailed enough to be specific to a single type of machine. The cool thing about that is that you don't have to create separate versions of the PDD translation for different machines. Then, each machine has a "final translator" which translates from "PDD" to "the language of my machine."

How to use driving skills to explain computer architecture

As a recruiter who trained other recruiters for systems professionals, I always found the car analogies extremely useful. Motor = Operating System Highways = Network Connectivity Stop Lights = Gateways Exits = Routers Mechanic = Systems Programmer Driver = Lead Applications Programmer/Analyst Navigator (Passenger Seat) = Business Manager/Systems Analyst Children in the back seat = P/A's, Programmers Back seat driver = End User Intersatate Highways & Radios = Internet Police Troopers = Webmasters Web sites = Destinations Steering Wheel = Mouse Chasis, etc = Hardware Gas, Oil, Water, Battery = Software Road Signs = Search Engines

Lube Job = Cleaning Files

What are the process of explaining computer memory Lets assume that you are home for lunch. Lunch gets prepared in the kitchen. Your bring all that is to be served to the dining table. Then you fetch a plate, pile it up with the stuff you are going to eat first. At the same time, you place enough amount of veggies or any other side dish (ketchup for that matter) on your plate, because you know you'll be using it frequently. Once that's done, you repeat the process, this time probably with a different set of food items. You make sure that for every meal, you bring all you would probably eat to the dining table. This helps you avoid multiple trips to the kitchen. Now, this is pretty much how the computer memory works. The main memory (kitchen) has all the data. The registers (dining table) contains all the relevant data. (i.e) All that the processor (you) thinks would be relevant to the current process (current meal). The cache (plate) is loaded with all the data which we assume would be used frequently. So the main memory has to be visited only once for each batch. The register will make sure that all the necessary data is available at short notice. The cache will contain all data which could potentially be used frequently and hence avoid repetitive flushing, loading and reloading of the same data.

What is an API Working on the API example in your question details: An API is like a set of dog training commands. You can instruct your dog to perform a set of actions - sit, fetch, play dead. Your dog understand these commands and takes the appropriate action. A better API and a more well trained dog understands more commands and can do more things. Standardizing APIs across multiple applications/dogs is often a good idea. It makes it easier to quickly get the behavior that you want. For example most dogs in the United States probably understand the command "down". A good application/dog will respond in a predictable manner to a command. Not all dogs/applications are good dogs.

A. [AI Artificial Intelligence ( AI ) ] trying to get computers to think for themselves as a cutting-edge technology , like trying to make a submarine own swim . [Analog ( analog ) ] dream of cheese sticking above the stars . [Antivirus software ( anti-virus software ) ] fly swatter . B. [Backward Compatible ( backwards compatible ) ] backward compatible means your newly purchased software ( or hardware ) , there are many old things , is a method of calculating how much you spend money wasted indicators. [BBS ( bulletin board ) ] using a pseudonym to allow the truth to say where . [Binary ( binary , binary ) ] seems to have both a boyfriend and girlfriend. [Binary ( binary ) ] when programming a computer programmer and found that only two thumbs to pull the air with his finger can also be used for calculation , and decided to binary . [Browser ( browser) ] complain like snitch fine , only a few cookies (cookie) will reveal everything you have done to others abominable traitor . [Bug (" bugs" ) ] heard a lot but have not seen it is said to be living in the computer pests. If you sincerely want to see , it would only make your E-mail address into a mailing list (Mailing List) either on the Internet. Enthusiastic Webmaster will not tell you to be disappointed . [Bug ( insects , bugs ) ] a way to get the system wrong thing , when the programmer tired , I will use Debug to it becomes changed appearance , but that does not mean it's really gone. [Buffer ( buffer ) ] bare ass programmers. C. [Chinese Card ( Hanka ) ] some of the guys did not learn a foreign language to engage in out of the East, the result not only enable more people to learn foreign languages. [Chinese Character Pen Inputting ( Kanji pen ) ] pull the vehicle carriage , with it, you can not learn to drive a car ride , a ride just a little slower than the speed . [Chinese Documentation ( Chinese technical documentation ) ] technical information with new hardware or software from, for users in solving problems of reference . They may be caused by a Japanese friend to translate from English into Chinese jujube characters full right, meaning wrong. [Clear Screen, CLS ( clear screen ) ] This DOS command is designed primarily for gamers , play the function of protecting bonuses and jobs . Playfulness in the video game is strong , the leadership if suddenly appeared , do not panic , give him a CLS. The children also recommend using this command to deal with the parents. [Client / Sever ( client / server ) ] is the child / parent relationship. As a child , as a client to the server is often the parents of the download (download) something, but rarely upload (upload) something, of course , except for trouble. [Clipboard ( clipboard ) ] my favorite authors , such as low-level stuff. We published occasional small " chunks " prominently posted at the top, everyone they come to exhibit some. We are writing this is dismissive. [Compatible ( compatible ) ] girlfriend shortcomings.

[Incompatible ( incompatible ) ] wife's shortcomings. [Compile ( assembler , editor ) ] pile of decomposed food. Difference [Computer Expert ( computer expert ) ] computer users in a class , and the average user is that they use the host computer is often left open the lid . [Computer User ( PC users ) ] screen blankly stare STARE who in general. Generally be divided into three levels: novice , intermediate and expert users . [New User ( Novice ) ] worry about knocking on the wrong computer key people who will be damaged . [Mid-L User ( Intermediate User ) ] key to knocking on the wrong computer or a program after the loss of human error . [Expert ( Expert ) ] busy messing up the computer yourself or others , directly or indirectly . [Computer Virus ( computer virus ) ] flew into the computer flies. [Computer Virus ( computer virus ) ] production of defense, consumer products manufacturers virus into the user's computer to try a devastating applet. Who like bicycle repair glass scattered on the road debris . [Computer Network ( computer networks ) ] a dedicated adsorption users ( especially younger users ) time, money and effort cobwebs. Its wide variety of sizes, different adsorption . [CPU ( central processing unit ) ] have the same trouble and humans , the house has been so great, people are more and more. [CPU ( central processing unit ) ] an imported fruit , just listed is often little expensive and not mature enough . But wait until after the very difficult to keep fresh ripe , soon that will be off the market in general . [Cracker ( Cracker ) ] gaming experts , the whole human experts . Playing video games , but also play genuine software authors and producers. D. [Data Compression ( data compression ) ] ladies really rude guy in the encounter they insist on asking the age, weight and other problems when taken in response. [Data Encryption ( data encryption ) ] ladies to measure their age , weight, etc., commonly referred to as data encryption taken . [Debug ( debug )] plus the English word "de-" prefix usually contain " remove ...... " means , for example, modulate the " modulation " and demodulate is " demodulation ." Therefore debug is the " removal " (de-) " bug " (bug) process. Ancestors created this vocabulary is how visionary ah ! "Debug" is likely to be a foreign pesticides name. [Default Directory ( default directory ) ] This is the place where all your files disappear . [Delete ( Delete ) ] the most efficient file compression methods currently available . [Desktop Publishing ( DTP ) ] This is a publication of Kara OK system to meet the most underappreciated hidden in the hearts of people publishing their own masterpiece desire. It has two advantages , one can from the editors of senseless foul smells , and second, even if it is wrong sentences or typos are also due to become a " type " and is particularly authoritative . [Direct Memory Access, DMA ( direct memory access ) ] money to his parents called DMA. [Disk ( disk ) ] tree rings record the passage of time is vast ; wisdom of human growth rings record pace

[DISKCOPY ( disk copy ) ] minorities do not want to pay but want to use genuine software users most commonly used commands. DOS is said to be one of the biggest mistakes. [Directory ( directory ) ] refers to the "black hole" in the common name , which means the computer Bermuda or Lop Nur , where the user's files often mysterious disappearance . [Drag and Drop ( drag and drop ) ] action on some of the postman or parcels or luggage porters imposed called drag and drop. In addition, you can also drag and drop action is usually seen in the slaughterhouse. [Driver ( Driver ) ] drives around looking for your humble short program . Although modest , but allows users to experience the feeling of a toothache , so some people think , " the driver is not the program , it does not have life ." [Download ( Download ) ] where the good stuff to other people , such wonderful pictures , receive their own computer , the process is similar to wait for the paint to dry. [Do it yourself, DIY ( do it yourself ) ] did not think that it recently became a computer and audio enthusiasts in the popular buzzwords . It was originally posted in the examination room where just a slogan , or spit out by the invigilator 's mouth , most candidates do not want to hear a word. E. [E-Business ( e-commerce ) ] This is a sad era of computer network products , the biggest downside is that it deprives happy when we count the money . [E-Journal ( electronic publication ) ] This is a proposal by a doctor who invented it's greatness lies in forcing the reader to get rid of a bed or in a bumpy carriage reading and other bad habits , and switched to a kinds of new ways to harm the reader's eyes. [End User ( end-user ) ] of the crash , the passengers that the honor of being on this aircraft and aircraft end-user items. [Error Acceptance ( fault-tolerant ) ] attitude of most parents treat their children . [Error Correction ( error correction ) ] to treat competitors attitude. [Error Message ( error message ) ] programmers to cover up their mistakes and give a brief accusing the user. [Error Message ( error message ) ] programmer to set some very concise statements in the program , often errors occur when the program appears on the screen , the purpose is to give the user a mild and gentle criticism. [Expansion Slot ( expansion slot )] located in the Economic Development Zone inside the computer case , to attract investment where everyone . should be installed on the computer's internal parts installed without a vacancy on the left , because the computer company, taking into account the user may panic on prices and the use of a computer allows users installments . [Extension Name ( file extension ) ] surname files, indicating that the file from which the family . Since the invention of the computer is a foreigner , to follow their habits , the file to your computer when registering to the surname on the back , but to every other point and name. [Evaluation Version ( evaluation version ) software ] is equivalent to the door at the mall or busy street corner hostesses distributed to passers-by as bait free trial or small containers for cosmetics packaging food. There are similar demo, trial software , and so on .

F. [File ( file ) ] user input and save it to your computer hard in everything collectively. When you want to open or print it often appears between the wrong format or internal error messages , etc., and users ' play is the heart . " [File Backup ( file backup ) ] as the world's most famous people to read . Often think , often talking about, but one thing never done before. [Freeware ( free software ) ] do not have to spend money to buy a few small software . Virus is a true real freeware . G. [General Protection Fault (GPF) ( General Protection Fault ) ] a common mistake made by Microsoft , the consequences borne by the user. 2 and into the classroom because of the crime of harboring hapless guilty of this error. H. [Hacker ( hacker ) ] and most of the other " geek ", as they like to patronize a variety of interesting sites , unfortunately, due to their lack of experience of young mistakenly enter from the side door or illegal channels . [Hardware ( computer hardware ) ] on the computer can be kicking part. General term for all [Hardware ( Hardware ) ] can be kicked or slapped with computer-related objects. [ Help system (Help)] allows users to produce a special software features more puzzled , if used properly , the user can move from one topic to another topic , jump from one window to another , and ultimately nothing back starting point. [Hardware Upgrading ( hardware upgrade ) ] get a new suit in the process . Put on a new suit and found unworthy of the original shirt ; later replaced by another piece of the new shirt, tie unworthy of the original discovery ; later for a new tie, belt unworthy of the original discovery ; for a new belt and found that the original shoes do not deserve , and for the shoes , we found the original suit and unworthy of the ...... and so on, until infinity . [Hark Disk ( HDD ) ] one filled with all kinds of dishes , color, smell and taste of the big platter. [Hark Disk ( HDD ) ] because beginners often have a hard shell and a floppy disk to the hard disk and floppy confused . In fact, very easy to distinguish between the two : the postman can call off a bad floppy disk , hard disk called off is not bad . [Horizontal case ( horizontal chassis ) ] own learning and ability , even relentless . [Hot Site ( hot site ) ] high temperature place , well-intentioned Chinese football fans for their team to build a new training , life and racing site , apparently in remission internationals who "fear the cold ( Han ) disease . " I. [Infomation Center ( Information Center ) ] that is usually only an expert or authority to go to work where their main task is to tell the user why he impatiently not qualified to get the information he wants.

[Internet ( Internet ) ] , but also so -called high-tech indeed , a two -year-old child can fiddle into an instant Internet easily a group of knitting wool . [Input / Output ( I / O ) ] used somewhat with some of the data, and then send a bunch of garbage who also confusion . [Interrupt Request, IRQ ( interrupt request ) ] This is what happens when only one phone line , " geek " at home embarrassing things . Who often rush to call issued such a request is objectionable . J. [Jet Print ( inkjet printers )] Since someone with a mop , sticks , fingers engage in so-called calligraphy, art creation, doctors and nurses have also demonstrated the unique creativity, invention of the syringe to draw and write with ink-jet printers. write ads on telephone pole or a wall of old medic joked . K. [Key Disk ( key disk ) ] student dormitories or hostels where the waiter aunt ladies tube corridor that things often get in the hands of the rushing sound is the key disk . [Keyboard ( Keyboard ) ] , as some people, no power no work pressure [Keyboard ( Keyboard ) ] often enter the wrong tool exchange system. [Keyword ( keyword ) ] almost every heart that only his name is the keyword. [ Frequently asked questions ] in the past long years there has been an " eat yet? " , Has recently become "you access it? ." L. [Long File Name ( long file names )] refers to as the " days without wind, not rain , the sky the sun " or " is not in such a night just like you think of me ? "Like the popular song . obvious benefits it brings , we can now be "Water Margin " was renamed " three women and one hundred and five men's Story " was. [Lost Chains ( the missing link ) ] This is the people in a very poetic language call himself a former husband or wife . M. [Machinery-Translating ( machine translation ) ] intention is to want to do good side mirror, but accidentally became a side " magic mirror " date will be the normal thing to produce the effect of distorting amusing . [Macintosh ( Mackintosh ) ] foreign trade names . The mark affixed to the most expensive apples. [Memory ( Memory ) ] on the species most merciful , and in the number of the most miserly . [Memory ( RAM ) ] one of the important parts of your computer. Vendors will be provided to the user when the varieties are often generous in it , the number stingy. Various concepts of memory problems by early computers , intermediate grade examination proposition favorite, opened membership to score gap.

[Modem ( modem ) ] likes to jump up to the guy jumped on the computer network , the strange thing is that despite the often dropped but could drop dead , so people called it the "cat" , the cat has nine lives thing. [Monitor ( Monitor ) ] a large trash can, some people always patiently repeated selection on the inside, looking for something that they like things [Monitor ( Monitor ) ] Roast is the electronic age , it 's main function is the user 's eye roast red . The default state is to open the file in general warming himself , after adjustment to the powerful Internet Kaohuo file. Some users have too much heat , in front of the screen plus a piece of transparent insulation board. [Mouse ( mouse ) ] a hapless mouse , I do not know what made the previous life of sin , the tail should be tied to the computer , but also at the mercy [Mouse ( mouse ) ] prostrate on the desktop screen a device aimed at the target . Its main features are often users do not want to go to a place , not a user went want to go. Little is known paraplegic who can use it as a tool to aid rehabilitation exercises . [Multitask ( multi-tasking ) ] grown in hopeful family children must assume the responsibility and obligation to date computer science , foreign language, learn music, learn dance, learn to paint , learn calligraphy, make up homework ...... N. [Nanosecond ( ns ) ] 10-9 seconds, which is 0.000000001 seconds . Usually a unit of measurement of computer memory access speed , sometimes also referred to as the product warranty book due to computer-generated period of time between failures . [Net User ( users ) ] the world's highest birth rates in today's race . And ordinary people of their age difference is not based on the length of time living in the world , but has been paid according to the ISP ( Internet Service Provider ) and calculate how much of the cost . O. [On-line ( online ) ] online half-step half-step move forward slowly , queuing to buy tickets when the time feels like the Spring Festival approaching . [Online Chat System ( IRC ) ] parked in a string of wire called sparrows twitter or swallow system is composed of the online chat system. [Open System ( open system ) ] computer manufacturers "eat and learn a lesson " of the product , defined by different manufacturers together constitute a system. This alone will not take responsibility in the system to crash by some manufacturers. Users have greater flexibility to select the object of complaints . [Optimize ( performance optimization ) ] software in common a feature similar to the purpose of lengthening the barrel on the board to increase storage capacity , typically on the same side of the piece under the barrel only saw part of it up to this on one side . [Optimize ( performance optimization ) ] to take advantage of my colleagues do not understand or did not pay attention , the public new 33.6K " cat " (MODEM) brought home to raise them , and put their own house old 14.4K " cat" give public to feed , surf the Internet in order to improve their efficiency called performance optimization.

[Optical Character Recognition, OCR ( optical character recognition ) ] This technology is divided into printed recognition and handwriting recognition are two categories : the newspapers , magazines or articles written down someone else's network , and then sent to affix their names published on printed name recognition technology . The level of recognition rate depends on the good or bad conscience plagiarist . [Optional ( Optional ( accessories ) ) ] was supposed to be something called free accessories . But after running the sales department and if it is called Excel discovery of optional accessories , then you can make a profit doubled , so now it is called that name .

P. [Paperless Office ( paperless office ) ] and no toilet paper , like sanitary ware TV commercials trying to preach , but one thing is still unaffordable for most people , for two reasons: first, because the economy , and second, because the habit . [Parallel ( parallel ) ] Another way travelers up and down the bus. In order to maintain the station unmanned everyone on parallel manner commonly used by car , of course, such a station called parallel port (Parallel Port). [Password ( password , password ) ] A computer could understand only black words. People [Password ( password , password ) ] This is life in contemporary society, but some of the most easy to forget things like spell must memorize . There is exciting news that we do not need to be back , because the password has been the advent of universal , that is money, with which you can be around unimpeded . [Personal Computer ( PC ) ] only I alone use , allow others to touch a public computer. [Peripheral ( Peripheral ) ] hanging clothes outside , around the waist of the device . Usually including mobile phones , BB , lighter , camera, sunglasses , Walkman, wallet , key ring or extra piece of jade . [Piracy ( illegal copying , piracy ) ] This is all the illegal activities of the most hated people are not honest one, of course, the premise is not to steal me. [Plug & Play PnP ( Plug and Play )] usually only public electrical equipment before has this feature. We often go to them eastward to westward from the socket outlet to which the change in this process can even switch off do not have a pull away , plug and play. pronunciation bad people will read it became a Plug and Play, can actually Plug and Pray ( plug and pray ) , when you add new hardware in the computer, you will ask God to bless it passed in Win95 identify and set it. [Portable Computer ( laptop ) ] public computer can easily got back home to their own use . [Power User ( computer expert ) ] God almost every unit is equipped with a master of the kind , they are most happy and most adept do is set up some barriers to others , so others can not use the computer to behave swimmingly they jumped . [Preday ( new software "pre- birth " ) ] After a careful calculation and strict proof draw date for the final release date of notice of new software . Official release date is usually obtained by subtracting the date that is six months . [Print ( Print ) ] a silly joke , as is the more realistic your stupid show.

[Printer ( Printer ) ] computer diarrhea , I give it feed. Curiously, the people holding those things were spilled sewage was seven or eight bad ecstatic. Shamao ! [Printer ( Printer ) ] crappy writing the Gospel , calligraphy casket . Usually consists of three parts: one for sticking labels panel , a tray of paper caught in full bloom and a flashing warning lights. [Priority ( priority ) ] refers to the key figures of loved ones , friends or classmates rights beautiful young ladies have. For example, the lexicographer family is trying to pull a good relationship with publishers to secure publication of this dictionary priority. In addition, among men or colleagues who face the same good lady , I put all the priority to her. Right with this relative called " step aside ." [Priority Interrupt ( priority interrupt ) ] specifically for the lower enjoy priority . For example, the lower the boss is on the phone and just also want to use the phone , you can enjoy this lower priority . In addition , I was watching TV while his wife wanted to see happen to another channel when I can enjoy this a priority . [Program ( Program ) ] tell you a secret : the computer is actually stupid, what is it taught me a step by step [Programmer ( programmers ) ] playwright. They work exclusively on a computer screen release. Similar developments with the film , whose works have gone from silent to sound , from black and white to color in the process . Unlike the general playwright programmer immortal . If you've ever heard of programmers have died , it is only because of their own after the program gosub statement forgot to add the return command. [Push (" push " technology ) ] This is a performance out of our responsibility in the face of a friend or distressed technology . R. [Reference Manual ( Reference Manual ) ] computer makers take into account the user may need to elevate the legs or computer monitor while the supplied one thing, good news is that they are usually free. [Relational Database ( relational database ) ] refers to your contacts or address book. Manufacturers swimming in the sea when the person who made it a life buoy on a career running them as amulets . [Release ( abandon ) ] repentance when programmers useless effort. [Restart ( reboot) ] after the user's Windows system problems can be given expert simplest and most effective technical support . Also the starting point for the next unpleasant experience . [Reset ( Reset ) ] is restarted , the popular argument is over again, that is, people caught a foul in the cards after most want to do . [Reset ( clear) ] to getting a value of zero command. We can also find examples of this in real life , such as once every boutique shopping with a girlfriend can make our wallets cleared once. [Resident ( memory-resident ) ] for most people , first love , others owe their money and someone else has done their own thing is memory-resident . S. [Save As ( save as ) ] is the Southeast Asian countries suffering from the financial crisis on the poor people who have lost confidence in the national currency , have their savings in the Save as relatively strong currency of another country .

[Scanner ( Scanner ) ] is simply a cleaner , wherever he went, garbage was thrown into the display intact [Screen Saver ( screen saver ) ] This is a mimosa , it's always when you inadvertently opened quietly , but if you move it a little bit and quickly closed. [Shell ( Shell ) ] A beautiful interface, mouse operation training program . It knocked the original keys 3-4 to complete the step operation into about 10 mouse actions to help users improve proficiency mouse operation. [Serial ( Serial ) ] a way to travelers up and down the bus. Some people maintain order in the station , we adopt a way to get off on the serial , this station is called a serial port (Serial Port). [Software Bundle ( package ) ] software vendor offers the user to put on the market and launched a number of popular software bundled discount sales form. In order to save the limited space at home users , software providers are often deprived of the manual or product warranty for each software. [Software Register ( software registration ) ] genuine users fill in the software company's market research report form , and the individual's age , gender, income , home address etc. It also should be sent to a company's quite proud of procedures. The main function is to provide statistical software company product sales and acquire new product launch advertising direction. [Software Upgrading ( software upgrade ) ] to remove the old program bugs (Bug), then put a bug in the new process . If the user is not in the process turned the old bugs , it would have to double to pay in order to purchase a new bug . [Stack ( stack ) ] put the lexicographers home stocking place. [Standard ( Standard ) ] name of a prestigious award in the advertising industry . Who has done the most the most attractive advertising the most pervasive , whose products can be labeled " standard " label. T. [Technical Support Hotline ( technical support hotline ) ] the few software companies have developed a free online tours . Users tend to be arranged after the phone call from the company's A to B sector department visits, and then from B to C sector ...... department during the tour , such as the user may also be invited to participate in reciting a long list of product serial number , answer a wide variety of Asked by a variety of activities like ...... [Tutorial ( guides, tutorials ) ] usually refers to a program to fill the remaining space on the disc is similar to the game outside of the program . Many major let users know the secret hidden in the depths of the program and rarely used features , allowing users to make sure that they spent so much money is worth it. [Trackball ( trackball ) ] So this was a drunken belly up after the fall of mice (mouse), no wonder it is moving very like playing Drunken Master . [Trailing Flag ( end marker ) ] is usually in addition to the start of hypocritical that will pitch the warmest , most durable and most sincere applause that marks the end of the meeting is . U. [Unconditional Branch ( unconditional branch ) ] when your views at odds with the future parents , you are required to immediately measure your stance is taken by the unconditional transfer. [Undelete ( recover deleted ) ] when we find a male ( female ) friends in front of a good time is usually not as good as you want to do.

[Unified File Format ( a unified file format ) ] refers to the responses from a serious exam cheating close up , sometimes also referred to as units, schools for our annual review of the work done or we are forced summary . [Uninstall ( uninstall ) ] to an already installed system applications to clear out of the system , similar to remove chewing gum stuck on the ground , more or less always leave so little unpleasant traces. [Uninterruptible Power Supplies, UPS ( uninterruptible power supply ) ] a total blackout like to show off their own guy [Uninstall ( cancel installation )] now people really snobbish , the lexicographer home just down the leadership position , they took my phone to uninstall the public expense . units in the " computer expert " in a hurry before the transfer from a computer job to do, because it allows young people a new respect for his chance. [Universal Serial Bus USB ( Universal Serial Bus ) ] in the user's grumbling , the computer and communications industry giants seven finally produced the study of this new , unified computer interface, which is similar to the multi- computer equipment commonly used power outlet. Before a socket can only be used for one shape of the plug , now, people smart, made out of the socket can accommodate plugs of various shapes . [Unrecoverable Error ( unrecoverable error ) ] If you speak ill of leadership reached behind his ears , you commit such a mistake. Also called a fatal error (Fatal Error). [Usenet ( newsgroups ) ] too troublesome family units and more than enough , and then the trouble around the world are moving back home , and then at home slowly concern for the ancients , but also for foreign weather troubles. [User ( user ) ] a group of guys in front of a computer in a daze , can be divided into three types. [User-friendly ( friendly interface ) ] refers to the particular occasion the kind of thing we have to hang on his face . For example, to recover someone owes you money when you always want to keep friendly interface ; care of others work, please have someone compliment to accept his gift when friendly interface . Another example is the purchase of computer users in consultation ago, merchants are userfriendly , and after buying a computer consulting , then turn the user -friendly interface is required to maintain a ...... [User friendly ( user-friendly ) ] allows programmers to feel happy about. V. [Virtual Reality ( VR ) ] media and the legal profession to start using this term . Fake news and false accusations , slander , etc. are vivid examples of virtual reality technology in social life . In fact, this technology existed since ancient times , but was called "unwarranted ." . [Voice Recognition ( Speech Recognition Technology) ] to answer the call when we usually say : " Hello , please speak ! " But sometimes , " Hello ," the other side does not answer for a long time , it touches a sudden the phone to hang . This is because the other side I do not judge him ( her ) looking for people based on speech recognition technology. This shows that it is an annoying technology. [Voice Input ( voice input ) ] It is a great invention Chatterbox dedication to , the computer will not miss a word patiently listened and recorded his words , and best of all is that it never talked back . . a novice level - afraid it will make the screen keyboard by clicking the explosion of people ;

. b Intermediate - but it does not fix corrupt people ; c Expert - . specialized in computer ruined man. W. [Windows ( Windows ) ] bug (Bug) and viruses (Virus) from entering your computer place. [Win95 ( Windows 95 ) ] compared to previous versions of Windows , the price rose by 95%, Macintosh component increased by 95 % of the disk space consumed close to 95 times the original . About 95% of the PC installed on the Windows 95. [Write-protect ( write protect ) ] which is a bit puzzling words , it really means is protected , not written. For example, when we mention the criticism of others , our brains are often in such a write-protected.

Difference between analog and digital

Let's do this with an example. Say you have a fan. To control it, you can use a simple switch, or use a regulator. When you use a switch, you can just turn it on or off. There are only two values for the state of the fan: on and off. When you use a regulator, you have more choice. You can run the fan at any number of speeds

In the above picture, you have five speeds. You can have six, seven or even more number of speeds. Even infinite, in those smooth moving regulators. Hence, the fan can have any number of states, not just on and off.

Analog electronics uses components that can have several states. They use transistors like regulators to have a lot of states. So you can control how much current passes through the transistors. Digital electronics, relies on circuits that have switches (transistors used in only two states, like using a regulator in only two positions, off or max). You can either have the switch on, or off. And this is used to perform all the data processing. We use digital electronics in general, since digital is a lot more tolerant to noise. Since there are only two states, there needs to be lot of disturbance before one state is mistaken for another. As a result, we can take more liberties while designing and go faster with digital electronics.

How can LTE be explained to freshers

The radio that handles the 4g signal at the tower (Called a BTS or base transmit station ) is the EnodeB. EnodeB's typically transmit at a max of 20 watts. Conversely a NobeB ( umts ) transmits at double that power. ( 40 watts ) LTe can be understood very well by understanding how a parallel cable in a computer works. Large ribbon cables are used to bus information around in a computer because you have many cables all transmitting the same ( essentially ) information. They are just doing it many times with less data. It all gets summed up on the receive device and boom high throughput. In LTE you have subcarriers (sc) and resource blocks ( rb O. In a 10Mhz channel you usually will have 300 sc and 1024rb . The size of one subcarrier is 15 khz. It gets much more complicated though. LTE's used a orthognal frequency multiple access technology ( ofdm ) scheme on the path from the tower to the phone ( downlink or dl ) and single carrier frequency division multiple access ( sc-fdma ) And the spectrum is modulated up to three different ways currently. Quadrature phase shift keying ( qpsk ) 16 quadrature amplitude modulation ( 16qam ) and 64 quadrature amplitude modulation ( 64qam) Holy bat farts that's vague! What does it mean? The ofdm portion is basically saying that the user data is broken down and transmits that data across multiple streams like a parallel cable. Making very efficient use of the spectrum on the DL. The sc-ofdm says that it each user has a single sub carrier that they transmit back on. This is much easier and requires less power and less sophistaced electronics making it ideal to fit in phones and the like.

When it comes to the modulation it all depends on the total quality of the signal. Or the signal to noise ratio ( SINR ) the higher the SINR the better the modulation scheme the faster the throughput. Qpsk is the lowest modulation scheme that can be used by LTE. It is basically saying that the phases of an analog signal ( the radio frequency wave ) are modulated to happen at certain times. If the peak of a wave happens in this time is considered a 1 and if the trough of a wave happens in this time it is considered a 0. This means what have modulated a digital signal on an analog wave. The next modulation scheme is 16qam. The QAMs do everything that the qpsk did but adds amplitude into the mix. The basically says that now you can have a loud 1 and loud 0 and a quiet 1 and a quiet 0. 64 quam just adds more volume positions to the mix so instead of just loud and quiet you have quiet , a little louder, medium, kinda loud, and loud. Modulation schemes get very mathy but are typically expressed in constellation charts. For those that remember geometry a constellation chart is just a graph over a x/y axis. There is also a negative quadrant for each positive quadrant. By visualizing the mod schemes in a x/y axis form we can understand what the error vector magnitude (evm) is for each modulation scheme. The evm is the margin of error allowed when plotting a symbol to the constellation point. A symbol can be thought of roughly as a packet. (Remember LTE is a digital data application ). So when you send you packet back on sc-ofdm it will be assigned somewhere on this graph. At Qpsk the graph only has 4 points. One in each quadrant. Its evm is the distance from the point to the y axis. Assume that each point is in the middle of each quadrant. 16qam has 4 points in each quadrant and its evm is the distance from one symbol th halfway to the next symbol ( mathy ) At 64qam there are 8 points per quadrant and the evm is the same. The quadrant size is the same during all of this you are just adding more lines in parallel ( remember parallel cable ). The problem arises when your packets start slipping into other symbols. When that happens ( due to low sinr ) the modulation scheme will shift down. Wifi has been using these modulation schemes for years. Wifi has also been using MIMO for years. MIMO is defined as multiple in multiple out. Simple put this is again the redundant application( parallel cable ) MIMO has different forms. 2 x 2 ( 2 transmit and 2 receive ) 4 x4, 8 x 8 etc.... Currently we are using 2x 2 for mimo because each addition is a seperate layer and must be kept seperate. That means seperate cables seperate antennas etc... In theory MIMO 2 x 2 doubles your throughput. Like all things I practice the answer of how much throughput increase is " well, it depends. " So this is getting quite long. TL:DR: -Lower frequency will have less attenuation over distance. In the US, ATT and VErizon have their spectrum at 700 MHz. They are also starting to deploy LTE at 2100 Mhz. This is the difference between a subwoofer and a tweeter in terms of attenuation.

-LTE uses complicated digital modulation streams which allow for error correction. -The receiver sensitivity of an EnodeB ( lte tower radio ) is very low meaning the phone doesn't need to talk loud to be heard ( and it uses sc-ofdm remember ) -the EnodeB does not transmit loud but very directive antennas are used on towers which add a lot of "gain".

What is the difference between virtual and physical server analogy

When talking about physical vs virtual servers. A physical server is a house. In this house is a single guy (application). The house is big and has a lot of rooms and can hold a lot of single guys. Over time the single guys spread out and start to make a mess. This can cause a problem for other guys at the house and they may not be able to do their job with the big mess. Virtualization is like building an apartment building. You can put a single guy in each individual apartment (virtual server) and they will only ever make a mess of their own place and not of the any other guy's apartments. That way everyone can do their job and only have to live with their own filth.

Question: Process , state, mutex , thread

no... a house is a process, the threads are people going about their business inside the house, the toilet is locked with a mutex/semaphore/whatever etc. Going the other way a housing estate contains the houses and the town is your virt host. Denial of service attack A DoS attack is more like one guy continually running in and out very quickly and ordering water, but so fast that he's preventing other customers from entering the bar.

RAM, CPU, HDD Now the HDD is like a file cabinet - you can put a lot of stuff in your cabinet, and some times the drawers might open slowly, ideally you want one with fast drawers and TONS of space The RAM is a desk - you want to work on a project, you take it out of the file cabinet, and put it on your desk to work on. The bigger the desk, the more stuff you can have open and working on at a time.

The CPU is you - A good CPU can process taking stuff in and out of the file cabinet, putting it on the desk, and making sure everything on the desk is handled quickly and efficiently. I think of it like a kitchen. Registers are what is in your hands/mixing bowl/cutting board. Cache is the counter-top. RAM is your kitchen cabinets. The hard disk is the freezer in the garage or basement. Of course, with most people you might not even use the cache example, let alone registers. A firewall is like a pigeon-hole shelving system that sits between your office and the outside world. Each shelf/box is numbered sequentially and certain types of requests are delivered or placed in certain boxes. Your office will EXPECT certain types of information to be placed in specific boxes. For instance. Mail will usually be placed in box#25 - but it doesn't have to be. You could put mail in box#352, but it'll probably never get delivered because the mailboy only ever looks in box 25. 26 sometimes if he has special instructions. Instructions to look up website addresses are put in box#53. Website pages are delivered from the outside world to box#80 etc. We protect our office by nailing closed some of the boxes that we never intend to use. That way there are less open holes between us and the outside world - some of which we never look at and don't know what are used for. Ideally we just board up ALL of them and cut open hold for just the ones we know we'll sometimes use. Let's say your 1-core CPU (albeit a powerful one!) can do really amazing things with her vajayjay. Now, let's say she got upgraded to a 2-core CPU. She could potentially use her hands or mouth. Let's keep going until we got to something analogous to 8-core Hyperthreading. First of all, although she can handle a lot of threads (men) at once, that doesn't mean the same priority is given to each. Secondly, some guy is getting a pretty weak footjob which barely counts (e.g. hyperthreads). Sure, she can start optimizing and switching tasks that are closer to being done to other areas, but at the end you really have little control as to in which order tasks finish. It's certainly difficult to keep track of all that. But, not all programs need this many threads per se. Most programs are like 1 man and the girl would only cause frustration and potentially disastrous outcomes if she started switching/groping wildly and randomly. Really, how often do you encounter orgies anyways? But, some tasks are like very amorous men and require some multi-threading outside of the orgy scenario. This would be like a pretty big SQL query or IO task. You'd want one thread whispering sweet nothings into the ear (UI thread) while the other tries its darnedest to get the job done. You wouldn't want the UI thread to lose interest lest the whole thing just crash and you have to start over. Filesystem cache in RAM: if you've got desk space to spare, it's faster to keep books at your desk if you need them later.

Confusion around the term "memory:" your desk works just as well no matter how big your bookshelf is, or how many books are on it, just as the number/size of files on your hard disk doesn't necessarily impact performance. Fragmentation: your books started out on the shelf nicely organized. You subscribe to a bunch of periodicals, and have to squeeze them in wherever they'll fit. Over time, things start looking a lot less organized. Defragmentation is sort of like organizing your bookshelves; if you wanted to pull down every Harper's from 1995, it's faster when they're all in a row on the same shelf. Swap space: you're out of disk space, but still need to read other books. You either have to keep putting books back on the shelf, or leave books open on the shelf, walking over when you need to read them. You sure wish you had a bigger desk. Filesystem corruption: somebody has stolen every book's cover and kicked over the bookshelf. Head crash: your book collection has been fed into a wood chipper. You sure wish you had photocopied the important ones

Client: why do we get viruses if we pay for monthly maintenance? Me: do you get meintenance for your car every 3 months? Client: yes Me: that doesn't stop someone from t-boning you at an intersection does it? Monthly maintenance does stop you from clicking shit you aint supposed to click.

Wireless carriers are well along on their transition to LTE technology. The FCC has stated it has determined LTE is the technology that will best provide a baseline for required interoperability and operability for public safety broadband communications. An article Wednesday by David Talbot in the MIT Technology Review cautions One Simple Trick Could Disable a City's 4G Phone Network. The Government's National Telecommunications and Information Administration sought comments from experts on the feasibility of using LTE for emergency responder communications and one of the comments was from Dr. Jeffrey H. Reed, director of Wireless@ Virginia Tech. Dr. Reed filed comments outlining the vulnerabilities in LTE. In the comments, he writes, If LTE technology is to be used for the air interface of the public safety network, then we should consider the types of jamming attacks that could occur five or 10 years from now. It is very possible for radio jamming to accompany a terrorist attack, for the purpose of preventing communications and increasing destruction. He cautioned jamming could also be used to create mayhem among public safety personnel. The preliminary research described by Dr. Reed and research assistant Marc Lichtman showed the extent to which LTE is vulnerable to jamming.

As every technical aspect of the LTE target signal is known, someone who knows communications engineering could use a laptop computer and a software-defined radio to target specific LTE control or synchronization signals. In Talbot's article, Lichtman says, There are multiple weak spots--about eight different attacks are possible. The LTE signal is very complex, made up of many subsystems, and in each case, if you take out one sub-system, you take out the entire base station. He used this analogy to describe what would happen: Imagine blocking all traffic lights so nobody can see if they are red and green, and see what happens to the traffic. Cars hit each other and nobody gets through. - See more at: http://www.tvtechnology.com/article/lte-vulnerable-tojamming/216413#sthash.BQEAKsec.dpuf

Pipeline Stages
Lets now go back to our car assembly line over in Analogy Land. Now would be a good time to go back and read the first part about memory hierarchy, since the following part will build on what was covered before. In order to build up our car as efficiently as possible, we need to be smart about how we manage our time, our space and our workers. We dont want to have to micromanage every employee and tell them what to do at every moment because that wouldnt be very efficient. It would also be terrible for employee morale, but luckily computers dont have feelings. Instead, we can break up all of the work that needs to be done into a minimal set of tasks, one for each employee:
1. Instruction Read

Heres how workflow will be structured: In order for the cars assembly to go smoothly, weve created an instruction manual. Its nothing more than a list of all the steps that need to be completed, but its extremely explicit so nobody could possibly get it wrong. The first workers job is simply to read the current instruction and print out several copies, give them to all the other workers so they know what to do next, then cross it off and get ready for the next one. This guys job is the Instruction Read (IR).
2. Instruction Prepare

Next up, the guy in charge of the Instruction Preparation (IP) for the current execution. He reads the instructions given to him, and then grabs the two parts needed off the shelf and drops them right in front of the assembler, who is next in line.

3. Perform Assembly

Its then dead simple for this worker to Perform the Assembly (PA) as he doesnt need to get up or even think; he just grabs the two pieces in front on him, attaches them, and passes on the result. It might seem silly to leave him so little to do, but since his individual jobs can sometimes be long (like attaching the transmission to the engine), we dont want him to have to worry about anything else.
4. Backroom Access

Then, if the piece weve just finished wont be needed for a while, like a completed engine, we dont want it taking up space on the tiny shelf, so we want the next worker to be dedicated to transport; hell grab whatever were done with and bring it to Access the Backroom for storage (BRA). We can also use him to go get a piece well be needing soon and bring it to the shelf. While this guy isnt always needed on every instruction, when we do need him the round-trip to the back room takes a while, and so its worth having someone dedicated to this job.
5. Bring Back To Shelf

Finally, if were done with the piece but well be needing it again soon, like the engine in the middle of assembly, our last worker Brings it Back to the shelf (BB) so itll be ready to go for the next instruction. Breaking away from the analogy for a moment, the table below shows how the assembly line stages compares to an actual CPU pipelines stages. The canonical example is the classic RISC pipeline, because its the simplest one to understand that exposes the most relevant technical aspects of pipelining.
Fictional Assembly Line Stages Instruction Read (IR) Instruction Prepare (IP) Perform Assembly (PA) Backroom Access (BRA) Bring Back To Shelf (BB) Classic RISC Pipeline Stages Instruction Fetch (IF) Instruction Decode (ID) Execute (EX) Memory Access (MEM) Write Back (WB)

An actual computer would perform tasks a lot like the workers above: first it would fetch an instruction (IF) from the currently running program, pass it to the next stage and move on to the upcoming one. Then the instruction would be decoded (ID) to figure out what we actually need to do and grab the two registers were going to do math with. The execution unit (EX) will then perform some operation like an addition, multiplication or comparison on these two registers

contents. Then, if were storing or loading values between the registers and the RAM, the memory access (MEM) stage will handle it. Finally, most of the time the result will be written back (WB) to another register so its ready to go for the next operation.

Courtesy of Wikipedia.org

The Need For Speed


Okay, so the setup was a little complicated, but now that its all in place we can sit back and appreciate the advantages of pipelining:

Speed: Since each worker has just one simple task to do, that means they can get really good at it and operate at ninja speed. Unfortunately it also means that the work is mundane and unfulfilling, but then if we got robots to do it people would just complain that their jobs are being stolen away, so what are you gonna do Parallelism: The work has been split up into tasks of roughly equal length, which means that workers should rarely be twiddling their thumbs as they wait for another job to finish. We call this a balanced pipeline and it means everyone is working simultaneously, as shown in the image above. This also means that tasks will reach completion at regular intervals, with shorter delays between them.

The best part is that it works even better on an actual CPU:

Scalability (Clock Rate): The pipelines performance is directly proportional to the processors clock speed, since an instruction is completed every clock cycle. This means that performance improvements are just an overclock away, and it explains the crazy trend of Intels ever faster CPU clocks in the 90s. Scalability (Pipeline Stages): Theres nothing stopping us from coming up with clever ways to divide the work into even more, smaller stages, so long as they remain roughly equal in length.

That would mean wed need more workers, but they would each do less, and so the whole pipeline would run faster by reducing the average delay between completed instructions.

Last Time, On The Internet


Its time for a quick recap of last weeks coverage. Recall that were trying to optimize the workings of an auto plants assembly line. To this end, weve divided the process of assembly into five stages, one for each worker, such that they can run in parallel and improve the systems overall efficiency. This is called pipelining and it hinges on the idea that each worker has only a single, simple task to do at any given time, before starting the next one. Since these tasks are short and simple, they can (and should) be executed as quickly as possible. The best to avoid the whole plant becoming a hectic mess is to have clear and explicit instructions detailing exactly what needs to be done at each moment. In fact, that was the very first stage of the pipeline we covered last time, the Instruction Fetch or IF. The worker filling this role of instruction fetcher is therefore in charge of maintaining the master list of instructions and making sure all the steps in the construction are done in the right order.

Awaiting Further Instructions


Fair enough, you might say, so theres some car designer somewhere that writes a list of instructions on how to build a car and then faxes the plant a copy and everything else is gravy. Well, sure, thats about right, but that also glosses over a couple of things First is the fact that the head office writing up these instructions is in Germany, but our particular plant is in China, as stereotypes would allow. Which means it needs to be translated into arguably the hardest language to learn, but thats a story about Assembly Programming for another time. Second, and far more importantly, is the fact that we don`t know what the workers in our particular plant are capable of. I mean, sure, we know that they have the general skill set and tools necessary to build a car, but are they capable of understanding and completing each and every instruction we send them? The workers have different things to do depending on the current instruction, and so we want them to have enough training that they know what to do in each case. We dont want to have to micromanage each employee at each instruction, we just want to tell everyone in the plant to mount the engine and then assume they know exactly what to do. This makes the job of the designer writing the instructions much easier, since he can just write a single high-level command and then know that it will be carried out correctly. Even better, he doesnt really need to know anything about this specific auto plant, only that they are capable of carrying out such a command. That means that so long as all the different auto plants all over the world have the same capabilities, we dont really care how they are executed internally! Thus, that means we can send the same exact instruction manual to every plant all over China, and even if the exact internal implementation of each plant is slightly different (for example, one of the workers is a robot), the end result (the cars they produce) will be the same.

What were describing here is the idea of an abstraction. In other words, the auto plant, to the designer, is just a black box that when you give it instructions (and parts) will produce cars. The workers of the plant simply have to tell the head office what instructions they are capable of, and this forms their interface, which is the only thing visible to the designer. This set of instructions they are capable of carrying out is aptly called their instruction set, which is all of the functionality that they provide. Its effectively the basic building blocks, since you can do much more complex things by simply combining multiple commands in clever ways.

A Simple Example
So then, what sort of instruction set does a typical auto plant provide? Well, there are many ways to get fancy and add extra functionality to our auto plant, but lets stick to just the basics, which are sufficient to get a car built from a heap of parts, and thats all that really matters. The easiest way to think of all the necessary instructions an auto plant needs to provide is to think of all of the things that can go wrong during the assembly: 1. Load: If we need a part that isnt currently on the shelf, we need to run to the backroom and get it. 2. Store: If the shelf is full, we need to make room, so we should pick a piece that wont be needed for a while and go store it in the backroom. 3. Add: The easy one, the simple act of attaching a piece to another, and then bringing it back to the shelf since well likely add to it again soon. 4. Compare: Sometimes we need to check if a piece is going to fit before installing it, and well have to follow alternate instructions if it doesnt. 5. Branch: When we need to follow alternate instructions, either due to an incorrect piece as above, or because we need to repeat a certain step several times, we simply jump to the new location in the instructions and resume work from there.

IRL
Just as the car designer writes instructions for the workers to follow, programmers write code (instructions) for the computers (the auto plant and its workers) to follow: 1. Load: Load some data from the RAM into a register. 2. Store: Free up a register by storing its data back into RAM. 3. Add: Add two pieces of data together. This could also be other common math operations like subtract, multiply, divide, shift, etc. 4. Compare: Check to see if one piece of data is bigger or smaller than another. 5. Branch: Jump to a new location in the code and continue executing from there. There are also conditional branches that will jump only if a certain condition is met. And even though it all looks incredibly simple, this forms the very foundation of all computing. Of course, in reality there are a few more instructions available to us, just take a look at this relatively simple MIPS instruction set. But the concept is still broken down into three categories:

data transfer (load and store), arithmetic and logic (add and compare), and control flow (branch). And these basic math operations allows us to do literally anything, just look at your smartphone.

Branching
Apart from loading or storing, the other important operation of a CPU is branching. Internally, the CPU keeps a record of the next instruction to be executed in the instruction pointer. Usually, the instruction pointer is incremented to point to the next instruction sequentially; the branch instruction will usually check if a specific register is zero or if a flag is set and, if so, will modify the pointer to a different address. Thus the next instruction to execute will be from a different part of program; this is how loops and decision statements work. For example, a statement like if (x==0) might be implemented by finding the or of two registers, one holding x and the other zero; if the result is zero the comparison is true (i.e. all bits of x were zero) and the body of the statement should be taken, otherwise branch past the body code.

Cycles
We are all familiar with the speed of the computer, given in Megahertz or Gigahertz (millions or thousands of millions cycles per second). This is called the clock speed since it is the speed that an internal clock within the computer pulses. The pulses are used within the processor to keep it internally synchronised. On each tick or pulse another operation can be started; think of the clock like the person beating the drum to keep the rower's oars in sync.

Fetch, Decode, Execute, Store


Executing a single instruction consists of a particular cycle of events; fetching, decoding, executing and storing. For example, to do the add instruction above the CPU must 1. 2. 3. 4. Fetch : get the instruction from memory into the processor. Decode : internally decode what it has to do (in this case add). Execute : take the values from the registers, actually add them together Store : store the result back into another register. You might also see the term retiring the instruction.

Looking inside a CPU

Internally the CPU has many different sub components that perform each of the above steps, and generally they can all happen independently of each other. This is analogous to a physical

production line, where there are many stations where each step has a particular task to perform. Once done it can pass the results to the next station and take a new input to work on. Figure 3-2. Inside the CPU

Above we have a very simple block diagram illustrating some of the main parts of a modern CPU. You can see the instructions come in and are decoded by the processor. The CPU has two main types of registers, those for integer calculations and those for floating point calculations. Floating point is a way of representing numbers with a decimal place in binary form, and is handled differently within the CPU. MMX (multimedia extension) and SSE (Streaming Single Instruction Multiple Data) or Altivec registers are similar to floating point registers. A register file is the collective name for the registers inside the CPU. Below that we have the parts of the CPU which really do all the work. We said that processors are either loading or storing a value into a register or from a register into memory, or doing some operation on values in registers.

The Arithmetic Logic Unit (ALU) is the heart of the CPU operation. It takes values in registers and performs any of the multitude of operations the CPU is capable of. All modern processors have a number of ALUs so each can be working independently. In fact, processors such as the Pentium have both fast and slow ALUs; the fast ones are smaller (so you can fit more on the CPU) but can do only the most common operations, slow ALUs can do all operations but are bigger. The Address Generation Unit (AGU) handles talking to cache and main memory to get values into the registers for the ALU to operate on and get values out of registers back into main memory. Floating point registers have the same concepts, but use slightly different terminology for their components.
Pipelining

As we can see above, whilst the ALU is adding registers together is completely separate to the AGU writing values back to memory, so there is no reason why the CPU can not be doing both at once. We also have multiple ALUs in the system, each which can be working on separate instructions. Finally the CPU could be doing some floating point operations with its floating point logic whilst integer instructions are in flight too. This process is called pipelining[1], and a processor that can do this is referred to as a superscalar architecture. All modern processors are superscalar. Another analogy might be to think of the pipeline like a hose that is being filled with marbles, except our marbles are instructions for the CPU. Ideally you will be putting your marbles in one end, one after the other (one per clock pulse), filling up the pipe. Once full, for each marble (instruction) you push in all the others will move to the next position and one will fall out the end (the result). Branch instruction play havoc with this model however, since they may or may not cause execution to start from a different place. If you are pipelining, you will have to basically guess which way the branch will go, so you know which instructions to bring into the pipeline. If the CPU has predicted correctly, everything goes fine![2] Conversely, if the processor has predicted incorrectly it has wasted a lot of time and has to clear the pipeline and start again. This process is usually referred to as a pipeline flush and is analogous to having to stop and empty out all your marbles from your hose!
Branch Prediction

pipeline flush, predict taken, predict not taken, branch delay slots
Reordering

This bit is crap

In fact, if the CPU is the hose, it is free to reorder the marbles within the hose, as long as they pop out the end in the same order you put them in. We call this program order since this is the order that instructions are given in the computer program. Consider an instruction stream such as Figure 3-3. Reorder buffer example
1: 2: 3: 4: r3 r4 r7 r8 = = = = r1 r2 r5 r1 * + * + r2 r3 r6 r7

Instruction 2 needs to wait for instruction 1 to complete fully before it can start. This means that the pipeline has to stall as it waits for the value to be calculated. Similarly instructions 3 and 4 have a dependency on r7. However, instructions 2 and 3 have no dependency on each other at all; this means they operate on completely separate registers. If we swap instructions 2 and 3 we can get a much better ordering for the pipeline since the processor can be doing useful work rather than waiting for the pipeline to complete to get the result of a previous instruction. However, when writing very low level code some instructions may require some security about how operations are ordered. We call this requirement memory semantics. If you require acquire semantics this means that for this instruction you must ensure that the results of all previous instructions have been completed. If you require release semantics you are saying that all instructions after this one must see the current result. Another even stricter semantic is a memory barrier or memory fence which requires that operations have been committed to memory before continuing. On some architectures these semantics are guaranteed for you by the processor, whilst on others you must specify them explicitly. Most programmers do not need to worry directly about them, although you may see the terms.

CISC v RISC
A common way to divide computer architectures is into Complex Instruction Set Computer (CISC) and Reduced Instruction Set Computer (RISC). Note in the first example, we have explicitly loaded values into registers, performed an addition and stored the result value held in another register back to memory. This is an example of a RISC approach to computing -- only performing operations on values in registers and explicitly loading and storing values to and from memory. A CISC approach may only a single instruction taking values from memory, performing the addition internally and writing the result back. This means the instruction may take many cycles, but ultimately both approaches achieve the same goal.

All modern architectures would be considered RISC architectures[3]. There are a number of reasons for this

Whilst RISC makes assembly programming becomes more complex, since virtually all programmers use high level languages and leave the hard work of producing assembly code to the compiler, so the other advantages outweigh this disadvantage. Because the instructions in a RISC processor are much more simple, there is more space inside the chip for registers. As we know from the memory hierarchy, registers are the fastest type of memory and ultimately all instructions must be performed on values held in registers, so all other things being equal more registers leads to higher performance. Since all instructions execute in the same time, pipelining is possible. We know pipelining requires streams of instructions being constantly fed into the processor, so if some instructions take a very long time and others do not, the pipeline becomes far to complex to be effective.

EPIC

The Itanium processor, which is used in many example through this book, is an example of a modified architecture called Explicitly Parallel Instruction Computing. We have discussed how superscaler processors have pipelines that have many instructions in flight at the same time in different parts of the processor. Obviously for this to work as well as possible instructions should be given the processor in an order that can make best use of the available elements of the CPU. Traditionally organising the incoming instruction stream has been the job of the hardware. Instructions are issued by the program in a sequential manner; the processor must look ahead and try to make decisions about how to organise the incoming instructions. The theory behind EPIC is that there is more information available at higher levels which can make these decisions better than the processor. Analysing a stream of assembly language instructions, as current processors do, looses a lot of information that the programmer may have provided in the original source code. Think of it as the difference between studying a Shakespeare play and reading the Cliff's Notes version of the same. Both give you the same result, but the original has all sorts of extra information that sets the scene and gives you insight into the characters. Thus the logic of ordering instructions can be moved from the processor to the compiler. This means that compiler writers need to be smarter to try and find the best ordering of code for the processor. The processor is also significantly simplified, since a lot of its work has been moved to the compiler.[4]
Notes [1]

In fact, any modern processor has many more than four stages it can pipeline, above we have only shown a very simplified view. The more stages that can be executed at the same

[2]

[3]

[4]

time, the deeper the pipeline. Processors such as the Pentium use a trace cache to keep a track of which way branches are going. Much of the time it can predict which way a branch will go by remembering its previous result. For example, in a loop that happens 100 times, if you remember the last result of the branch you will be right 99 times, since only the last time will you actually continue with the program. Even the most common architecture, the Intel Pentium, whilst having an instruction set that is categorised as CISC, internally breaks down instructions to RISC style sub-instructions inside the chip before executing. Another term often used around EPIC is Very Long Instruction World (VLIW), which is where each instruction to the processor is extended to tell the processor about where it should execute the instruction in it's internal units. The problem with this approach is that code is then completely dependent on the model of processor is has been compiled for. Companies are always making revisions to hardware, and making customers recompile their application every single time, and maintain a range of different binaries was impractical. EPIC solves this in the usual computer science manner by adding a layer of abstraction. Rather than explicitly specifying the exact part of the processor the instructions should execute on, EPIC creates a simplified view with a few core units like memory, integer and floating point.

You might also like