Math Problem Statement

Fill the 3 tables

Fill the 3 tables for FIFO, priority without preemption, and priority with preemption scheduling.

Solution

The image shows a problem related to process scheduling with three processes (P1, P2, P3). The table provides key data for each process, such as:

  • Execution time
  • I/O time
  • Priority

There are three tasks:

  1. First-In, First-Out (FIFO) scheduling according to the process numbers.
  2. Priority-based scheduling without preemption.
  3. Priority-based scheduling with preemption.

Each task requires filling in the Gantt charts provided for each process.

Step-by-step instructions:

Given Information:

  • P1: Execution time: 2 units, I/O time: 2 units, Priority: 3
  • P2: Execution time: 4 units, I/O time: 3 units, Priority: 2
  • P3: Execution time: 2 units, I/O time: 2 units, Priority: 1

Task 1: FIFO Scheduling (First In, First Out)

For FIFO, the processes are executed in the order they are listed: P1, P2, P3. You fill the Gantt chart by assigning the CPU time to each process based on its execution time and I/O.

  1. P1: Execute for 2 units.
  2. P2: Execute for 4 units.
  3. P3: Execute for 2 units.

Chart 1 would look like this:

P1: ||  
P2: ||||||  
P3: ||  

Task 2: Priority-Based Scheduling (No Preemption)

For this case, the highest priority is chosen, and processes are executed without interruptions.

  • P3 has the highest priority (Priority 1), so it will execute first.
  • Then P2 (Priority 2).
  • Finally P1 (Priority 3).

Chart 2:

P3: ||  
P2: ||||||  
P1: ||  

Task 3: Priority-Based Scheduling (With Preemption)

In this case, the highest priority process interrupts the current process if it arrives during execution.

  1. Initially, P3 (Priority 1) runs for 2 units.
  2. Then P2 (Priority 2) begins, running for 4 units.
  3. Finally, P1 (Priority 3) runs for 2 units.

Chart 3:

P3: ||  
P2: ||||||  
P1: ||  

Would you like me to clarify or adjust any of these schedules?