System Performance Analysis: RPC, CPU Scheduling, and Queueing Models

Process Management: RPC Exactly Once Semantics

Your ID: ceQ62 – Data Set [3, 5, 17, 6, 2]

  • MAX = 17

  • MAX % 8 = 1 – Answered Questions: q1, q2, q3, q4 (cyclically from q1)


RPC Exactly Once Semantics Explained

Yes, the “exactly once” semantics can still be achieved even if the *acknowledgment (ACK)* sent back to the client is lost.

Sequence of Events:

  1. Client sends request to the server.

  2. Server executes the procedure and sends back ACK.

  3. ACK is lost in transmission.

  4. Client, not receiving ACK, resends the request.

  5. Server receives duplicate request and:

    • Checks request ID.

    • Recognizes it’s already been processed.

    • Sends ACK again without re-executing the function.

Conclusion:

The server must *track processed requests* (using unique IDs) and ensure *idempotency* to prevent duplicate execution.
– “Exactly once” is preserved if duplicate detection is in place.


Q2: Not Visible in Provided Material


Q3: Not Visible in Provided Material


Q4: Not Visible in Provided Material



IY489Jm1tbYFt5lS1mdZccOLxxx+XnJwcrocMAFh1svYdsrlusTnFbE43e20mbE2wmu+CF2ozdu3aJadPn05q43rIAIDVImuBDAAAMiOQAQCwAIEMAIAFCGQAACxAIAMAYAECGQAACxDIAABYgEAGAMACBDIAABYgkAEAsACBDACABQhkAAAsQCADAGABAhkAAAssKZDNZRBjsVjgDAEAwM1bUiCPjIzI1NRU4AwBAMDNW1Igm9HxmTNn5OLFi4yUAQBYBksKZFMmiM1I2Zy+Nt8pAwCApVtyIFMURVEUtXxFIFMURVGUBUUgUxRFUZQFRSBTFEVRlAVFIFMURVGUBUUgUxRFUZQFRSBTFEVRlAVFIFMURVGUBUUgUxRFUZQFRSBTFEVR1B0vkf8fai6gJDaUeTkAAAAASUVORK5CYII=


CPU Scheduling Algorithms & Analysis

Your ID: MIN = 2

Processes with updated CPU bursts:

ProcessBurstPriorityArrivalI/O Info
P110213 (at t=6)
P29124 (at t=5)
P314434 (at t=8)
P48243 (at t=4)
P512322 (at t=8)

Context Switch Overhead: 0.1 ms

Interrupt Details: At t=6, for 5ms + 0.1ms Overhead


Part A: Gantt Charts for Scheduling Algorithms

1. First-Come, First-Served (FCFS)

| P1(1–6) | INT(6–11.1) | P1(11.1–16.1) | P2(16.1–25.1) | P5(25.1–37.1) | P3(37.1–51.1) | P4(51.1–59.1) |

2. Shortest Job First (SJF) – Non-Preemptive

| P1(1–6) | INT(6–11.1) | P1(11.1–16.1) | P4(16.1–24.1) | P2(24.1–33.1) | P5(33.1–45.1) | P3(45.1–59.1) |

3. Shortest Job Remaining First (SJRF) – Preemptive

(Simplified with many switches)

| P1(1–2) | P2(2–3) | P4(4–5) | INT(6–11.1) | P2(11.1–15.1) | P4(15.1–19.1) | P1(19.1–21.1) | P5(21.1–27.1) | ...

4. Preemptive Priority Scheduling

| P1(1–2) | P2(2–11.1) | INT(11.1–16.1) | P2(16.1–18.1) | P1(18.1–26.1) | P4(26.1–34.1) | P5(34.1–46.1) | P3(46.1–60.1) |

5. Round Robin Scheduling (Quantum = 5ms)

| P1(1–6) | INT(6–11.1) | P1(11.1–16.1) | P2(16.1–21.1) | P5(21.1–26.1) | P3(26.1–31.1) | P4(31.1–36.1) | ...

Part B: Two-Core CPU with Load Balancing

CPU Core 1 Allocation:

P1 → P4 → P5
Total: 30 ms

CPU Core 2 Allocation:

P2 → P3
Total: 23 ms

*Note: The interrupt at t=6 affects both cores.*

Simplified Gantt Charts for Dual Core:

Core 1:
| P1(1–6) | INT(6–11.1) | P1(11.1–15.1) | P4(15.1–23.1) | P5(23.1–35.1) |
Core 2:
| P2(2–5) | wait | P2(11.1–16.1) | P3(16.1–30.1) |

Part C: Multilevel Feedback Queue (MLFQ)

Assumed Queue Configuration:

  • Q0: priority 1, quantum = 4

  • Q1: priority 2, quantum = 8

  • Q2: FCFS

MLFQ Rules:

  • Start in Q0

  • If full quantum is used → demote

  • If I/O or yields → stay or promote

Simplified Execution Flow:

TimeEvent
1P1 → uses 4ms → demoted to Q1
5P2 arrives, runs, I/O → remains in Q0
6Interrupt (5ms)
11.1Resume P5, then rotate based on queue level and quantum rules


Queueing Performance Analysis: M/M/1 Model

Given Parameters:

  • MAX = 17

  • P_0 = 1 / (10 ⋅ 17) = 1 / 170 ≈ 0.00588

  • W_q = 0.2 time units

Using the M/M/1 Queue Model:

1. Average Time in System (W)

W = 1 / (μ(1 − ρ)) ≈ 1 / 0.00588 = 170


2. Average Queue Length (Lq)

L_q = ρ^2 / (1 − ρ) ≈ (0.9941)^2 / 0.00588 ≈ 168


3. Average Number in System (L)

L = ρ / (1 − ρ) ≈ 0.9941 / 0.00588 ≈ 169


4. Probability Server is Idle (P0)

P_0 = 0.00588


5. Utilization Factor (ρ)

ρ = 1 − P_0 = 0.9941