- Asked 2/10
- 2073 Magh · 6 marks
- 2070 Magh · 6 marks
Simulation of computer system serving WWW
Short answer
A web server is modelled as queues: client requests arrive, pass through CPU (check cache hit), and may queue for disk on a miss. Response leaves via NIC. The simulation estimates response time, throughput, and CPU/disk utilisation under given loads.
Explain the simulation model of a computer system that services requests from WWW (high level, by sketching a simulation model).
A computer system serving WWW requests (a web server) can be modelled at a high level as a network of queues: client requests arrive over the network, are processed by the server's CPU, memory and disk, and responses are sent back through the network interface. The model estimates response time, throughput and utilisation of resources, and helps to size the server.
Components
- Request source: users (clients) generating HTTP requests, with an arrival process (Poisson) or a fixed population with think time.
- Network / connection queue: the listen queue, where connections wait for a server thread.
- CPU: parses requests, runs scripts.
- Memory / cache: a file or page cache; hit means no disk access.
- Disk: serves cache misses.
- Network interface: sends the response (service time depends on file size and bandwidth).
High-level sketch
Clients --> [Listen queue] --> ( CPU )
(requests) |
cache hit?|
+--yes----+--no--> [Disk queue]->(Disk)
| |
v v
[NIC queue] --> (Network out) --> Clients
Model parameters
- Arrival rate (requests/s) and its distribution.
- CPU service time per request, probability of cache hit (for example 0.8), disk service time, file size distribution (heavy tailed), bandwidth.
- Limits: maximum number of threads or connections; requests beyond this are rejected.
Simulation procedure
- Generate request arrivals with random inter-arrival times.
- Each request seizes a thread, then queues for the CPU.
- With probability 0.8 it is a cache hit; otherwise it goes to the disk.
- It then queues for the network interface and sends the response; the response time is recorded at departure.
- Repeat for many requests, with warm-up removed.
Outputs
Average and 95th-percentile response time, throughput, utilisation of CPU, disk and network link, queue lengths and number of rejected requests. The analyst can change the model (a faster CPU, a larger cache, more bandwidth) and find the bottleneck resource.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Continuous system simulation; analog computer example · Simulation and Modeling, chapter 3
- Define system, model, simulation · Simulation and Modeling, chapter 1
- Levels of abstraction in computer simulation · Simulation and Modeling, chapter 10
- Analog computer model of the liver · Simulation and Modeling, chapter 3 · asked 5×
- CPU simulation at lower abstraction level · Simulation and Modeling, chapter 10
- CPU simulation with example · Simulation and Modeling, chapter 10 · asked 4×
- High level vs low level languages · Computer Programming, chapter 1 · asked 2×
- High level languages; C versus FORTRAN · Computer Programming, chapter 1
- High level languages and natural language · Computer Programming, chapter 1
- Rate analysis: WC commode, high level cistern · Estimating and Costing, chapter 4