Question

In: Computer Science

Task 5 - Pipelining (20 marks) Robin, Bryan, Finchie, and Dan each have messages to send...

Task 5 - Pipelining
Robin, Bryan, Finchie, and Dan each have messages to send via carrier pigeon.
There are three ordered stages to sending a message via carrier pigeon::
1. 25 minutes of Writing the message
2. 10 minutes of Fanning the ink dry
3. 15 minutes of Catching and sending a pigeon
Notes: There is only one pen to share There is also only one fan (without it the ink
will never dry) There are multiple pigeons but only one can be caught at a time
(They startle easily) Fanning must happen before catching a pigeon (or it will fly
off.. startled)
(hint: Draw timeline diagrams to calculate the total times etc)

a) (4 + 7 = 11 marks) How long does it take for all to send messages sequentially?
How long does it take for all of them to send messages pipelined?

b) How and why does pipelining help with the throughput of entire
workloads?

The workloads involved in sending 4 messages as described above, in comparison
to sending 4 messages sequentially?

c) (2+3 marks) Can pipelining help reduce the latency of any one step in the 4
people sending a message scenario as described above?

Show how the pipeline rate is limited by the slowest pipeline stage.

Solutions

Expert Solution

a) How long does it take for all to send messages sequentially?
    How long does it take for all of them to send messages pipelined?

Following symbols are used in the timeline diagrams:

W-Writing

F-Fanning

C-Catching and Sending Pigeon

Time required for sequential execution of the tasks

Time (minutes)

25

10

15

25

10

15

25

10

15

25

10

15

Total Time = 200 minutes

Robin

W

F

C

Bryan

W

F

C

Finchie

W

F

C

Dan

W

F

C

In pipelined execution of the task, a pipeline stage will take maximum duration of the task executed in that stage.

Time required for pipelined execution of the tasks

Time (minutes)

25

25

25

25

15

15

Total Time = 130 minutes

Robin

W

F

C

Bryan

W

F

C

Finchie

W

F

C

Dan

W

F

C

b) How and why does pipelining help with the throughput of entire workloads?

When pipelining is used, throughput increases. This is because, the pipelining allows the tasks to be executed in parallel, without being wasting the time by sitting idle. For example, in the given case, once Robin has completed writing his message by using the only pen available, Bryan could use the pen while Robin moves on to Fanning the message. By exploiting the parallel execution, pipelining can reduce the total time required for the execution of the combined tasks and thus increase the overall throughput.

This is obvious from the given example. The workloads involved in sending 4 messages take only 130 minutes in comparison to the 200 minutes required in sending 4 messages sequentially.

c) Can pipelining help reduce the latency of any one step in the 4 people sending a message scenario as described above? Show how the pipeline rate is limited by the slowest pipeline stage.

Pipelining will not reduce the latency of any single pipeline stage. In fact, it may increase the latency of a single pipeline stage. This is illustrated in the following pipelined execution of the tasks:

Time required for pipelined execution of the tasks

Time (minutes)

25

25

25

25

15

15

Total Time = 130 minutes

Robin

W

F

C

Bryan

W

F

C

Finchie

W

F

C

Dan

W

F

C

As shown in the timeline diagram given above, Robin requires minimum of 25 minutes for Fanning, instead of the actual 10 minutes required when messages are send sequentially. Similarly, Robin requires minimum of 25 minutes for Catching and Sending Pigeon, instead of the actual 15 minutes required when messages are send sequentially. As it is evident from the example, pipelining will not reduce the latency of a single pipeline stage.

The pipeline rate is always limited by the slowest pipeline stage. As illustrated in the above pipeline stages, Robin takes 25 minutes each for Writing, Fanning and Catching and Sending Pigeon for sending his message for a total of 75 minutes, instead of the 50 minutes required while sending the message in sequential. This happens because the latency of each individual pipeline stages must wait until the slowest pipeline stage is completed before proceeding to the next pipeline stage.


Related Solutions

Robin, Bryan, Finchie, and Dan each have messages to send via carrier pigeon. There are three...
Robin, Bryan, Finchie, and Dan each have messages to send via carrier pigeon. There are three ordered stages to sending a message via carrier pigeon:: 1. 25 minutes of Writing the message 2. 10 minutes of Fanning the ink dry 3. 15 minutes of Catching and sending a pigeon Notes: There is only one pen to share There is also only one fan (without it the ink will never dry) There are multiple pigeons but only one can be caught...
Task 8 - Hamming & SECDED Code (5+20= 25 marks) (a) (5 marks) For data, using...
Task 8 - Hamming & SECDED Code (5+20= 25 marks) (a) For data, using 3 Hamming code parity bits determine the maximum number of data bits that can be protected. (b) A SECDED encoded character has been retrieved, with the hexadecimal value of 409 to power of 16. You may assume that the SECDED parity is even. 1. (1 + 4 marks) Was there an error in transmission? Explain your answer. 2. If there was an error, either correct it...
Task 7 - Memory (5 +5 + 5 +5 = 20 marks) Please explain in your...
Task 7 - Memory (5 +5 + 5 +5 = 20 marks) Please explain in your own words for each part of Question 7. Quote your references in your ―References‖ / ―Bibliography‖ (a) What does INTEL‘s ―Optane Memory‖ provide? (b) What are some of the claims made by the ―Intel Marketing Department regarding Optane Memory. DDR5 memory is the latest computer memory being developed and will eventually replace DDR4 memory. (c) What are the maximum clocks speeds for DDR4 memory,...
Task 6 – CPU Architecture (20 marks) Please explain in your own words for each part...
Task 6 – CPU Architecture Please explain in your own words for each part of Question 6. Quote your references in your ―References‖ / ―Bibliography‖ (a) 1. For modern CPU architectures please explain what is true about this statement. “Why you cannot use CPU clock-speed only to compare computer performance.” Marks will be awarded for research and clear explanations into CPU concepts of threads, multi – threads, cores, relationship between cores and threads, multi- tasking and multi-processing. 2. Explain how...
Two transmitters send messages through bursts of radio signals to an antenna. During each time slot...
Two transmitters send messages through bursts of radio signals to an antenna. During each time slot each transmitter sends a message with probability 1/2. Simultaneous transmissions result in loss of the messages. Let X be the number of time slots until the first message gets through. (a) Describe the underlying sample space S of this random experiment and specify the probabilities of its elementary events. (b) Show the mapping from S to the range of X. (c) Find the probabilities...
Question 2 [1 marks each/20 marks] True or false 5) In an unregulated competitive market, the...
Question 2 [1 marks each/20 marks] True or false 5) In an unregulated competitive market, the presence of marginal external cost of a good or service results in overproduction. 6) A marginal external cost is the cost of producing an additional unit of a good that falls on the producer. 7) Young drivers often buy used cars. An increase in the legal driving age to twenty-one shifts the demand curve for used cars leftward, whereas lowering the age to fifteen...
Question 2 [1 marks each/20 marks] True or false 5) In an unregulated competitive market, the...
Question 2 [1 marks each/20 marks] True or false 5) In an unregulated competitive market, the presence of marginal external cost of a good or service results in overproduction. 6) A marginal external cost is the cost of producing an additional unit of a good that falls on the producer. 7) Young drivers often buy used cars. An increase in the legal driving age to twenty-one shifts the demand curve for used cars leftward, whereas lowering the age to fifteen...
QUESTION 5 (20 Marks) 5.1 List FIVE (5) requirements for perfect competition to exist. (5 marks)...
QUESTION 5 5.1 List FIVE (5) requirements for perfect competition to exist. 5.2 Explain why any firm maximises profit, or minimises losses, when marginal cost is equal to marginal revenue. 5.3 Explain the shape of the marginal revenue curve facing (a) a perfectly competitive firm and (b) a monopolistic firm.
QUESTION 5 (20 Marks) 5.1 List FIVE (5) requirements for perfect competition to exist. (5 marks)...
QUESTION 5 5.1 List FIVE (5) requirements for perfect competition to exist. 5.2 Explain why any firm maximises profit, or minimises losses, when marginal cost is equal to marginal revenue. 5.3 Explain the shape of the marginal revenue curve facing (a) a perfectly competitive firm and (b) a monopolistic firm. (10 marks
SQL DATABASE Task 2 [10.5 marks] using the AdditionCollege database For task 2, we have provided...
SQL DATABASE Task 2 [10.5 marks] using the AdditionCollege database For task 2, we have provided you with the creation script for the AdditionCollege database. Run this script in MySQL Workbench to create the database. You should execute your query solutions to extract the necessary information. The script is based on the following schematic: Unit (Unit_code, Staff_id, [UnitName]) Staff (Staff_id, StaffName, Position, Gender) Taught_by (Unit_code, Staff_id, weekday) Student (Student_id, Student_name, Address, Gender) TuteGroup (TuteGroup_code, Unit_code, DayHrCode, Room_Nr) TuteGroup_List (TuteGroup_code, Student_id)...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT