Consider the following processes and their associated threads running on a multiprocessor system: Process Thread Arrival Time CPU Burst I/O Burst Total CPU Time X X1 0 4 2 11 X2 3 2 4 5 X3 3 2 4 5 Y Y1 5 6 2 14 Y2 5 3 5 7 Z Z1 7 1 1 6 Z2 7 3 2 10 Create a scheduling simulation for these threads on a system with two (2) processors using the First Come First Served (FCFS) algorithm. A thread may migrate from one processor to another if it returns from blocked waiting time and 1) the processor it was running on previously is occupied with other work; and 2) and the other processor is available to execute the thread. If both processors are available when a thread becomes unblocked, it will remain on the processor it was most recently running on. In this simulation, you will be managing a single ready queue that schedules all processes. When two processes arrive in the ready queue at the same time, the following rules of priority apply: Give highest priority to a newly arriving thread Give the next highest priority to a thread completing its blocked wait time if two threads are unblocked at the same time, prefer the one that waited the longest if both blocked threads waited the same amount of time, prefer the one that comes alphabetically first (e.g., X1 beats Y1); if still tied, then prefer the one that comes numerically first (e.g., X1 beats X2) Give the lowest priority to a thread that has just finished its time slice if two threads finish their time slices at the same time, prefer the thread that is lower alphabetically first (e.g., X1 beats Y1); if still tied, prefer the thread that comes numerically first (e.g., X1 beats X2)     For each of the three simulations, you must submit the following items listed below: A timeline of the simulation (you may draw these by hand and scan/photograph them, or create them electronically using your word processor or graphics program). Calculate the turnaround time, queue waiting time, and response time for each process in items #1 and #2, and for each thread in item #3. Calculate the average turnaround time, average queue waiting time, and average response time among all processes in items #1 and #2, and among all threads in item #3. Calculate the percentage of idle time for the CPU overall in items #1 and #2, and for each CPU in item #3. Calculate the total number of context switches involved (including whole and half context switches) for items #1 and #2; for item #3, calculate the number of context switches that occurred on each CPU. For item #3 only, calculate the total number of times a thread migrated from one processor to another.

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter11: Operating Systems
Section: Chapter Questions
Problem 11VE
icon
Related questions
Question

Consider the following processes and their associated threads running on a multiprocessor system:

Process

Thread

Arrival Time

CPU Burst

I/O Burst

Total CPU Time

X

X1

0

4

2

11

X2

3

2

4

5

X3

3

2

4

5

Y

Y1

5

6

2

14

Y2

5

3

5

7

Z

Z1

7

1

1

6

Z2

7

3

2

10


Create a scheduling simulation for these threads on a system with two (2) processors using the First Come First Served (FCFS) algorithm. A thread may migrate from one processor to another if it returns from blocked waiting time and 1) the processor it was running on previously is occupied with other work; and 2) and the other processor is available to execute the thread. If both processors are available when a thread becomes unblocked, it will remain on the processor it was most recently running on.


In this simulation, you will be managing a single ready queue that schedules all processes. When two processes arrive in the ready queue at the same time, the following rules of priority apply:

  • Give highest priority to a newly arriving thread
  • Give the next highest priority to a thread completing its blocked wait time
    • if two threads are unblocked at the same time, prefer the one that waited the longest
    • if both blocked threads waited the same amount of time, prefer the one that comes alphabetically first (e.g., X1 beats Y1); if still tied, then prefer the one that comes numerically first (e.g., X1 beats X2)
  • Give the lowest priority to a thread that has just finished its time slice
    • if two threads finish their time slices at the same time, prefer the thread that is lower alphabetically first (e.g., X1 beats Y1); if still tied, prefer the thread that comes numerically first (e.g., X1 beats X2)

 

 

For each of the three simulations, you must submit the following items listed below:

  • A timeline of the simulation (you may draw these by hand and scan/photograph them, or create them electronically using your word processor or graphics program).
  • Calculate the turnaround time, queue waiting time, and response time for each process in items #1 and #2, and for each thread in item #3.
  • Calculate the average turnaround time, average queue waiting time, and average response time among all processes in items #1 and #2, and among all threads in item #3.
  • Calculate the percentage of idle time for the CPU overall in items #1 and #2, and for each CPU in item #3.
  • Calculate the total number of context switches involved (including whole and half context switches) for items #1 and #2; for item #3, calculate the number of context switches that occurred on each CPU.
  • For item #3 only, calculate the total number of times a thread migrated from one processor to another.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Parallel Processing
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning