Let us understand the concept of python in a simple way. A pipelining is usually a process of arrangement. It arranges the elements of the central processing unit to increase the performance. The pipelining concept can increase the overall performance of computer architecture. But how does it get increased? To understand in detail the concept of pipelining in computer architecture.
Let us take an example.,Suppose you have an unplanned car factory, all the workers in the factory are using the same car, after the so many hours, only one car get ready. It refers as 1 car is ready in 24 hours, whereas the pipelining model of a car factory, the workers can be classified into different teams, Each team works on different functions like Team A can do on the engine, Team B can work on all the unbought cars and Team C works for the paint of the car.
After completing the respective assigned work on each team, it goes to work the same function on the other car. In this different Teams are providing different functions, this benefits and minimize the throughput to 1 car per 8 hours. Now let us know a clear understanding of how this pipeline functions and is implemented in the computer architecture. Normally we have three stages in computer architecture.
In each stage, it fetches the code and executed it in the pipeline of the computer. After completion of the fetching decoding and then it moves for the execution of the other instruction. It represents that only one instruction is get executed at a time. The below figure represents the pipelining model in the computer architecture. It is used to decompose a single process into a no of sub-processes. Each subprocess gets executed simultaneously that minimizes the throughput time. We can implement any type of process and can be executed by applying the concept of pipelining. Each sub-process get executes in a separate segment dedicated to each process.
The main advantage of the pipelining process is, it can increase the performance of the throughput, it needs modern processors and compilation Techniques. The pipelining concept uses circuit Technology. It Circuit Technology, builds the processor and the main memory. We can complete the multiple loads in a small amount of time is called the pipeline. We can perform multiple tasks in a small amount of time by using a different number of resources, it always helps for the efficiency through by performing the multiple tasks at the same amount of time.
The performance of the pipeline gets limited when one stage of the pipeline stage takes a longer amount of time. In the above example, working on the engine takes more time than painting the car. The number of stages in the pipelining is equal to the potential speed of the pipelining. The pipelining performance may be decreased if the stages in our pipeline get unbalanced. The below figure represents the concept of pipeline applying to the processors of the computer architecture.
The figure shows the data path, how the load instruction gets moves through each stage of the machine. The first stage of the instruction says how it fetches the program counter value and that can read the instruction. after the completion of the stage, the instruction decode is done that takes the instruction and uses these instructions to read the source register out of the register file.
By using the source register value, it gets encoded in the instruction that can compute the address at the execution stage. After the completion of these steps, we able to access the memory at the memory stage and can read the value out of the memory at the final stage of the pipelining. The final stage of the pipelining is called the right back. The right backstage can take the memory value that can move in into the register file. The Execution step has different functional units, below figure 1.2 represents the execution steps of the pipelining. Each execution step uses a different part of our machine.
During the clock period, the execution step uses the different parts of the machine. At the beginning of the cycle, we can access the instruction memory and becomes ideal after completion of its task, until the beginning of the next time, we able to access the instruction out of the memory. The next step is to register the file, the registered file can read the ports. These ports can be used only for a short period.
After the instruction is received, we do not use them again for the whole process of the cycle. The same steps are applied to all hardware. We do have much hardware that does nothing until the completion of the cycle. So we use that hardware to work, when the instruction reads the memory out of the instruction, the instruction memory starts to access the register file after it completes to read the file.
Now, the instruction memory sits ideal throughout the process in the cycle. So we try to fetch the second instruction immediately after completion of the first instruction. Similarly, when it completes to read the first instruction and move to the execution stage and the second instruction is ready to enter the next step that reads the register file, this process works continuously for all the instructions.
The pipeline process is divided into five processes, the pipelining machine is divided into five stages. The stages consist of the instruction fetch stage, an instruction decode stage, and execute stage and the last step is called the right backstage. We can support the five stages of the instructions by executing all the instructions parallelly. Each stage contains its own type of resources present in it. Let us know the overview of all stages of the pipelining concept. For the modern central processing units, we have different kinds of risks.
These can prevent the pipeline from operating at maximum efficiency. For the modern CPU’s the instruction process is divided .into smaller steps. We use the independent hardware units that are used to perform each step in the instruction processing. Usually, we have four key steps, processing fetch decoding, executing, and then write back. The Central processing unit can process these instructions in the cycle. We first fetch the instructions from the memory unit with the help of the instruction fetch unit. The next instruction is to get decoded into know the type of operation we are going to use in the instruction.
The instruction actually performs the tasks and then it regenerates the outputs. These outputs and results can be stored back in the memory for the use of the next instruction. The processing cycle kept repeating and continuing to process the instructions in a program. It can process only one instruction at a time. Without applying the concept of the pipeline, it processes only one instruction at a time and the rest of the hardware remains ideal. Let us understand briefly how these instructions are going to execute. We can have several types of instructions, initially, it starts with the IF called Instruction fetch instruction.
It decodes the instruction one and executes the instruction. After the execution, the results are stored back in the memory. The same process is executed for all types of instructions. For the completion of each stage, it takes a millisecond of time. For the execution of each instruction, it can take 4k time units for the processing of the instruction. The pipelining can executes different types of instructions at their different stages, and the hardware works at the different instructions. the fetched instructions move to the decode.
The Pipeline processes each of these instructions and the different stages of the hardware processes the different types of the instructions and continues to flow through the central processing unit. It keeps all the stages busy and using the hardware effectively. Pipelining usually is a technique where multiple instructions get executed and get overlapped for efficient throughput in the central processing unit. All the stages in the concept of pipelining do not sit ideal, but it is able to perform different tasks at the same time.
It keeps all parts of the Central processing unit busy. when we think about the Over all time taken, each instruction takes the same time as each stage takes the same milliseconds as K seconds.The overall time taken for the processing of the instructions reduces to six milliseconds. Before the arrival of the pipelining concept, all the three instructions took 12k milliseconds time to process, The difference between the with processing and without processing is, the overall throughput takes less time in pipelining than using without pipelining.
The pipelining works as it always the part of the hardware, we can not stop the process of the pipelining, the pipeline cannot reduce the time taken to process the single instruction, but the pipelining can increase the throughput of the processor by effective use of the hardware. The Pipelining benefits be only shown when we have a large number of instructions on the computer.