Temporal Parallelism and Data Parallelism

Опубликовано: 28 Февраль 2026
на канале: MyCSPal
5,070
90

Welcome to the video, here we will discuss the concepts of temporal parallelism and data parallelism. Let's start the discussion with an example.
Let's say an admission procedure is going on in a college and you are responsible for the admission of the students. You want to minimize the time required to admit 100 students, and you have three different methods for doing so.
First, consider the situation there is only one counter performing three different jobs of the admission procedure. Here every student has to complete the three different stages of admission i.e document verification, subject selection and fees payment on a single desk. let's calculate to find out the amount of time required to complete the process for 100 students.
Let's assume the document verification procedure will take about 40 seconds, the subject selection procedure will take 30 seconds and the payment of the fee will take about 60 seconds. The total time for a single student will take about 130 seconds and, for one hundred students, it will take about 13000 seconds. We will use the above value to compare this serial model with our parallel models.

Let's consider a parallel method where we have three different counters for performing three operations. Here the first counter will perform the document verification. The second counter will perform subject selection but only after completing the first process, the third counter will accept the fees. Here all the operations are to be performed sequentially. Each student has to visit all the counters one by one in the sequence to get admission. Let's calculate the total time required. Here all the counters will take the same amount of time except, the fee payment counter as the service time is 60 seconds. We will assume the time required will be 60 seconds for a single student, as we can see processing from the service point of view, 60 seconds are sufficient to process the data of 3 different students concurrently although the service time for a single student will always be 130 seconds as the student have to complete the process sequentially. For one hundred students we need more than 6000 seconds but, we will use 6000 for comparison. This method is known as temporal parallelism because we have divided the different jobs and not the data having different amounts of time required.

Let's consider another parallel method where we have three different counters each performing a complete admission procedure. that is a student can get admission by queuing at any of the counters. A student is not required to switch any counter so the traffic can be equally distributed. Let's calculate the total time required. Here the time for the basic processes will be the same that is 40, 30 and 60 seconds. The total time for a single student will take about 130 seconds and for 100 seconds it will take 13000 seconds. But as we have divided the process into three different counters each performing the same job we can expect the time taken to be 4420 seconds which is significantly lower as compared to the serial and temporal parallel method. this process of dividing data is known as data parallelism.

If we compare the above methods the serial will take the maximum amount of time, the data parallelism will take significantly lesser time as compared to other methods. Here the temporal parallelism is not applicable because different sub-processes have different service times. But if they have the same amount of time required, then they will be better. Let's modify our example and see the result. Let's assume the different sub-process of document verification, subject selection and fees payment are taking 30 seconds. So for a single student, it will take 90 seconds and, for 100 students entire process will take a little more than 3000 seconds as we have three different counters. But, data parallelism is much better in any of the scenarios.
Okay, that's all for this video. We will discuss more parallel computing in the upcoming videos.
Your Queries
1) Temporal Parallelism
2) Data Parallelism
3) Parallel Computing
4) Temporal Parallelism Vs Data Parallelism