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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education