National University of Singapore · FACULTY OF COMPUTER SCIENCE

CS5239 Chap.8 Operational Laws

- one subject, every graph, every model, every mark
7 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 8 of 9 · CS5239

Operational Laws

Why measured means are enough

Earlier queueing models start from an assumed arrival process and an assumed service distribution, then derive averages. Operational analysis reverses that order. A device is observed for a fixed window, three counters are read off (arrivals, busy time and completions), and every quantity of interest is built as a ratio of those counters.

Because the relationships are identities between observed averages, they hold whatever the underlying distributions happen to be, which is why they are the first tool to reach for when a system has been instrumented but never modelled.

The price of that generality is one condition. Job flow balance requires that, inside the window, the jobs entering a device or a subsystem roughly equal the jobs leaving it.

Choose a window that is long relative to individual job lifetimes and the condition is usually close to true; choose one that ends mid-burst and arrival rate and throughput drift apart.

From counters to demands

Throughput is completions over the window, utilization is busy time over the window, and service time per visit is busy time over completions.

The visit ratio is a per-job count: device completions divided by system completions. Multiplying visits by per-visit service time gives the service demand, the device seconds a single job uses at that device across its whole life.

Demand is the quantity that ranks devices, since utilization equals system throughput times demand, and the device with the biggest demand saturates first.

The five relationships and what each consumes

The utilization law links a device's rate and its service time to its busy fraction.

Forced flow ties one device's throughput to the system's through the visit ratio, which means a single instrumented disk is enough to recover system throughput. Little's law converts a mean population into a mean time for any balanced region, from a single queue to the whole system. The general response time law weights each device's per-visit time by its visit count and sums.

The interactive law treats a closed population of users who alternate between waiting and thinking, so throughput equals the number of users divided by the length of one think-plus-wait cycle.

Selection before calculation

Questions in this area rarely test algebra. They test whether you can see, from a paragraph of measurements, which relationship has all of its inputs available.

A good habit is to annotate each given with its unit basis: per visit, per job, or per second. Per-second quantities at different levels are connected by visit ratios; per-visit times become per-job times only after multiplying by visits.

Most wrong answers mix those bases, for instance dividing a device queue by system throughput, or adding a per-visit response time straight into a system total.

When two routes to the same number exist, use both. In a closed interactive system the general law and the interactive law must give the same response time, because the users who are not thinking are exactly the jobs sitting in the device queues.

A mismatch points to a misread counter.

Where this leads

The same identities underpin the bounding analysis that follows in the lecture: because no utilization can exceed one, the largest demand caps throughput, and because a lone job never queues, the sum of demands is a floor on response time.

For a single first-come-first-served server, the measured service time and utilization also give the per-visit response time as service time divided by one minus utilization, a reminder that delay grows sharply as a device nears saturation.

In this chapter

What this chapter covers

  • 01

    Operational quantities from arrivals, busy time and completions

  • 02

    Visit ratios and service demand per job

  • 03

    Utilization law and the bottleneck device

  • 04

    Forced flow law linking device and system throughput

  • 05

    Little's law at a device and for the whole system

  • 06

    General and interactive response time laws

  • 07

    Job flow balance as the one standing condition

Worked example · free

Response time of an instrumented storage server

Q [8 marks]. A storage server is observed for 120 s and completes 2400 requests. Each request visits the CPU 4 times (0.005 s per visit) and the disk 3 times (0.012 s per visit). Mean queues, including the job in service, are 0.8 at the CPU and 2.4 at the disk. Find device utilizations, the busier device and the mean response time per request. The step weighting is an AskSia study allocation, not a University marking scheme.
  • 1Compute system throughput from completions over the window.
  • 2Apply the forced flow law to get each device throughput.
  • 2Apply the utilization law and name the device with the larger demand.
  • 3Use Little's law with device throughput for per-visit times, then weight by visits and sum.
System throughput is 2400/120 = 20 requests per second. Forced flow gives the disk 20 x 3 = 60 visits per second and the CPU 20 x 4 = 80. Utilization law: disk 60 x 0.012 = 0.72, CPU 80 x 0.005 = 0.40, so the disk is the busier device with demand 3 x 0.012 = 0.036 s. Little per visit: disk 2.4/60 = 0.04 s, CPU 0.8/80 = 0.01 s. General response time law: 3(0.04) + 4(0.01) = 0.12 + 0.04 = 0.16 s per request. Check with Little on the whole server: 20 x 0.16 = 3.2, which equals the summed queues 2.4 + 0.8.
Sia tip — Before dividing any queue length, write the throughput beside it with its unit: Little at a device needs X_i = X V_i, and the answer is per visit until you multiply by V_i.
Glossary

Key terms

Operational Quantity
A value measured directly over a finite observation period, such as arrivals, busy time or completions at a device.
Job Flow Balance
The condition that arrivals equal completions at a device or subsystem during the observation window, required by every operational law.
Visit Ratio
The mean number of visits a job makes to a device before leaving, computed as device completions divided by system completions.
Service Demand
The total service time one job needs at a device over all its visits, equal to visit ratio times service time per visit.
Utilization Law
The identity that a device's busy fraction equals its throughput times its per-visit service time, or system throughput times demand.
Forced Flow Law
The relation stating that a device's throughput equals system throughput multiplied by that device's visit ratio.
General Response Time Law
The result that system response time is the sum over devices of visit ratio times per-visit response time.
Think Time
The mean interval an interactive user spends between receiving a response and submitting the next request.
FAQ

Operational Laws FAQ

Do operational laws need Poisson arrivals or exponential service times?

No. They are relationships between averages that were actually measured over an observation window, so they hold for any distribution. The single condition they lean on is job flow balance, meaning arrivals and completions match in the region the law is applied to. Distributional assumptions only return when you want to predict behaviour that was never measured.

How do I find system throughput when only one device was logged?

Use the forced flow law in reverse. Divide that device's measured throughput by its visit ratio and you have the number of jobs completed per second by the whole system. From there every other device throughput is system throughput times its own visit ratio, and utilizations follow from service times or demands.

Why does my response time come out far too large when I use Little's law at a disk?

The usual cause is dividing the disk queue by system throughput instead of disk throughput. Device throughput is larger by the visit ratio, so the mistake inflates the result by that factor. Remember too that Little at a device returns time per visit; a job pays that time once per visit, which the general law accounts for.

When should I use the interactive response time law instead of the general one?

Use it when the problem gives a closed population of users, their mean think time and the system throughput but not device queues. It treats each user as cycling through one wait and one think. If queues are also given, compute both routes; in a consistent closed system they agree exactly, which makes a useful self-check.

What does a negative response time from R = N/X minus Z mean?

It means the inputs cannot all be true at once: the claimed throughput exceeds what the users could generate even with zero waiting. Often a per-visit device rate has been used where system throughput was needed, or think time was quoted in different units. Recheck which counter was divided by the window.

Study strategy

Assessment move

Take one practice problem and, before calculating, label every given as per visit, per job or per second, then write which of the five laws each label unlocks. Solve the response time by both the general and interactive routes whenever queues and think time are available, and treat any disagreement as a misread counter.

Working through Operational Laws in CS5239? Sia is AskSia’s AI Computer Science tutor — ask any CS5239 Operational Laws question and get a clear, step-by-step explanation grounded in how CS5239 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 21 of your National University of Singapore subjects - and 1,000+ Bibles across every Australian university.
Sia - your CS5239 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works