Minimum Average Latency
The term Minimum Average Latency (henceforth referred to as MAL) comes into the picture when we consider non-linear pipelines.
In non-linear pipelines, as we know, the stages can be used in different orders or even multiple stages can be used in the same cycle. So, it becomes difficult to determine when to initiate each successive task in order to obtain maximum performance without conflict.
Reservation Tables
Here we see a sample reservation table for a 3-stage pipeline and an 8-cycle task. The 'X' marks represent the corresponding pipeline stages used in different cycles by the task. For example: The task uses Stage S3 of the pipeline in the 3rd cycle.
Latency, Forbidden Latencies & Collision Vectors
Now, we must wait for some cycles before we can initiate another task on the pipeline without conflict. The no. of cycles between initiations is called latency.
Now, some latencies are forbidden because they lead to collision, i.e. a simultaneous need for the 'same stage' by two different tasks. These are called Forbidden Latencies.
For example: for the above reservation table, if we initiate another task after two cycles, then it'll lead to collision [ the stage S2 will then be used by the cycle 4 of task 1 & cycle 2 of task 2 ] and hence the initiation isn't possible, thus '2' is a forbidden latency.
There is a systematic way to represent all forbidden latencies for a reservation table, called the Collision Vector.
Collision Vector is a n-bit vector, where n=no. of cycles needed for the task-1
C= (Cn Cn-1 Cn-2 …… C1), C is the collision vector
Now, Ci=1, if the latency 'i' causes collision & Ci=0, if the latency 'i' is permissible
The collision vector for the above reservation table is 1011010.
State Transitions & Latency Cycles
State diagrams can be constructed to specify the permissible transitions among successive initiations of tasks.
[ Here 'state' means that, the Collision Vector gives us info. about the pipeline that which latencies are allowed and which are not, for task initiation; this info. is being referred to here as 'state'. So each CV is regarded as the state of the pipeline. ]
The next state of the pipeline at time t+p can be obtained as follows-
Right-shift the present Collision Vector for the reservation table by p bits and then logically OR the obtained Collision Vector with the original Collision Vector.
For example: We want to find the state of the pipeline after 1 latency (corresponding to the above Collision Vector and Reservation Table)
Original Collision Vector(CV): 1011010
1-bit right shifted CV: 0101101
New CV (corresponding to the new state): 1011010 | 0101101 = 1111111
Latency Cycles are the set of latencies which upon successively applying on the original state (CV) of the pipeline results in a constant Collision Vector.
For example: for the above Reservation Table
Original state: 1011010
State-1 after a 1-bit shift on original state: 1111111
State-2 after an 8-bit shift on State-1: 1011010
Now, here we see that we get the original state back after operating 2 latencies successively: 1 & 8. Now if we again apply 1 & 8, then we will keep getting the same state. Thus 1,8 is called a latency cycle.
Other Latency cycles for the above reservation table.
Average Latency & Minimum Average Latency
Average latencies are defined for the different latency cycles for a reservation table. And the minimum of the average latencies give us the Minimum Average Latency (MAL).
For example:
For the latency cycle 1,8 for the above reservation table, the
Average Latency = Sum of latencies in the cycle / No. of latencies in the cycle.
Thus, average latency for cycle 1,8 = (1+8)/2 = 4.5
Bounds on Minimum Average Latency (MAL)
Lower Bound: Maximum no. of checkmarks in a row in the original reservation table
Upper Bound: No. of 1's in the original Collision Vector + 1
Pipeline Optimization Using Delays
To further optimize the pipeline usage even after finding MAL, we can use the concept of introducing 'non-compute delays' in the pipeline. Using these delays, we can change the reservation table of the pipeline so that collisions that were occurring earlier do not happen.
I'll try to explain it through an example:
Suppose we have a 3-stage pipeline with 5 cycles and the following reservation table:
Original CV: 1011 and Minimum Average Latency: 3
Now, let's say we introduce a delay of one clock cycle after the 3rd cycle and the 5th cycle, then we get the following reservation table:
Now the new CV: 100010
For the above reservation table the MAL comes out to be: 2 (for the latency cycle 1,3)
Thus, here we see that the introduction of a delay in the pipeline results in even more optimization due to the reduction of MAL.
References:
Advanced Computer Architecture by Kai Hwang
#No direct copying of content done from any sources from the internet or otherwise.
Links For Further Study:
http://iris.nyit.edu/~mcolef/eeng633/extras/Pipelining&Superscalar_Techniques_ch6.ppt
http://vlsi.catholic.ac.kr/pds/data/class/advcom/adcom4.pdf
Compiled By:
Vipul Gaur 368/CO/11
Vijay 364/CO/11
VIRUS REMOVAL
ReplyDeleteIs Your Computer Sluggish or Plagued With a Virus? – If So you Need Online Tech Repairs
As a leader in online computer repair, Online Tech Repairs Inc has the experience to deliver professional system optimization and virus removal.Headquartered in Great Neck, New York our certified technicians have been providing online computer repair and virus removal for customers around the world since 2004.
Our three step system is easy to use; and provides you a safe, unobtrusive, and cost effective alternative to your computer service needs. By using state-of-the-art technology our computer experts can diagnose, and repair your computer system through the internet, no matter where you are.
Our technician will guide you through the installation of Online Tech Repair Inc secure software. This software allows your dedicated computer expert to see and operate your computer just as if he was in the room with you. That means you don't have to unplug everything and bring it to our shop, or have a stranger tramping through your home.
From our remote location the Online Tech Repairs.com expert can handle any computer issue you want addressed, like:
• - System Optimization
• - How it works Software Installations or Upgrades
• - How it works Virus Removal
• - How it works Home Network Set-ups
Just to name a few.
If you are unsure of what the problem may be, that is okay. We can run a complete diagnostic on your system and fix the problems we encounter. When we are done our software is removed; leaving you with a safe, secure and properly functioning system. The whole process usually takes less than an hour. You probably couldn't even get your computer to your local repair shop that fast!
Call us now for a FREE COMPUTER DIAGONISTIC using DISCOUNT CODE(otr214426@gmail.com)on +1-914-613-3786 or chat with us on www.onlinetechrepairs.com.
LIVE Entry – 1 (March-21-2014)
ReplyDeleteProblem: HP Printer not connecting to my laptop.
I had an issue while connecting my 2 year old HP printer to my brother's laptop that I had borrowed for starting my own business. I used a quick google search to fix the problem but that did not help me.
I then decided to get professional help to solve my problem. After having received many quotations from various companies, i decided to go ahead with Online Tech Repair (www.onlinetechrepairs.com).
Reasons I chose them over the others:
1) They were extremely friendly and patient with me during my initial discussions and responded promptly to my request.
2) Their prices were extremely reasonable.
3) They were ready and willing to walk me through the entire process step by step and were on call with me till i got it fixed.
How did they do it
1) They first asked me to state my problem clearly and asked me a few questions. This was done to detect any physical connectivity issues with the printer.
2) After having answered this, they confirmed that the printer and the laptop were functioning correctly.
3) They then, asked me if they could access my laptop remotely to troubleshoot the problem and fix it. I agreed.
4) One of the tech support executives accessed my laptop and started troubleshooting.
5) I sat back and watched as the tech support executive was navigating my laptop to spot the issue. The issue was fixed.
6) I was told that it was due to an older version of the driver that had been installed.
My Experience
I loved the entire friendly conversation that took place with them. They understood my needs clearly and acted upon the solution immediately. Being a technical noob, i sometimes find it difficult to communicate with tech support teams. It was a very different experience with the guys at Online Tech Repairs. You can check out their website www.onlinetechrepairs.com or call them on 1-914-613-3786.
Would definitely recommend this service to anyone who needs help fixing their computers.
Thanks a ton guys. Great Job....!!