CS FundamentalsVery hardProduct-company system-design interview
A single-server queue (M/M/1) serves 10 requests per second. At 8 requests/s the mean response time W = 1/(μ - λ) is 0.5 s. What happens if the arrival rate rises to 9 requests/s, and what is the average number of requests in the system, ρ/(1 - ρ), at each load?
- A. W rises to 0.56 s; 4 and 4.5 in the system
- B. W rises to 1.0 s; 4 and 9 in the system
- C. W stays 0.5 s; 0.8 and 0.9 in the system
- D. W rises to 0.9 s; 8 and 9 in the system
Correct answer: B. W rises to 1.0 s; 4 and 9 in the system
W = 1/(10 - 9) = 1.0 s, double the earlier 0.5 s, and the queue length grows from 0.8/0.2 = 4 to 0.9/0.1 = 9. A 12.5% rise in load doubles latency, which is why services are not run near 100% utilisation.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- 90% of a CI pipeline's run time is parallelisable tests and 10% is serial setup. Moving to 8 parallel runners, what overall speed-up does…
- A suite of 1,200 tests averaging 3 seconds each is split evenly across 6 parallel shards, and each shard needs 2 minutes of setup before…
- A cache answers 90% of reads in 2 ms; on a miss the read takes 50 ms in total (cache check plus database). What is the average read…
- Each web server handles 250 requests/s, but for headroom servers should run at no more than 70% of that. Peak load is 2,000 requests/s and…
- A service stores 2 TB of data with a replication factor of 3, and disks should be kept at most 70% full. How much raw disk capacity is…
- A host has 32 physical cores and the cloud team allows a 4:1 vCPU-to-core overcommit ratio. How many 4-vCPU VMs can be placed on it by…