BCA
Operating systems laboratory
Study map: Original subject-specific business–computing teaching chapter
An operating system manages how programs use processing, memory, storage and devices. Business applications depend on this coordination even when users interact only with a browser or spreadsheet. A report can be delayed by competing work, lost through a storage failure or exposed through unsuitable access. Understanding systems helps a learner distinguish application errors from resource and execution problems.
Foundation: the operating system coordinates resources
An operating system manages how programs use processing, memory, storage and devices. Business applications depend on this coordination even when users interact only with a browser or spreadsheet. A report can be delayed by competing work, lost through a storage failure or exposed through unsuitable access. Understanding systems helps a learner distinguish application errors from resource and execution problems.
Separate a program from a process. A program is a set of instructions; a process is an executing instance with state and resources. Multiple processes can share a computer while requiring isolation. A slow task does not necessarily mean the processor is continuously working on it; the task may wait for input, storage or another service.
Begin practice with a model whose assumptions are explicit. A simulated scheduler can explain waiting and turnaround time without representing a modern kernel. The local lesson uses invented jobs and touches no operating-system settings. Predict the sequence before running the simulation so the output becomes evidence for understanding rather than a mysterious result.
Undergraduate: calculate scheduling and expose a race
Three jobs arrive together at time zero, with durations five, two and one. First-come scheduling in that input order completes them at five, seven and eight. Waiting times are zero, five and seven, averaging four; average turnaround is twenty divided by three. Shortest-job-first order completes them at one, three and eight, with waiting zero, one and three.
This comparison assumes known durations, no later arrivals, no context-switch costs and non-preemptive execution. Shortest-job-first's favourable average in this fixture does not make it universally suitable. Long jobs may wait when short work keeps arriving, and real durations may be uncertain. Describe the boundary before making a business scheduling recommendation.
Illustrate a lost update with two workers reading a counter value zero, each adding one and each writing one. Final value one loses an increment. Serial execution yields two. This deterministic interleaving demonstrates a race concept; it does not launch real threads or benchmark locks. Identify the read–modify–write critical section and the intended invariant.
Postgraduate: connect concurrency, persistence and protection
Apply a workload–resource–state–failure–recovery framework. Define the workload, identify shared resources, trace state changes, consider failure and specify recovery. A scheduling improvement is insufficient if updates corrupt records. A successful write during normal execution is insufficient if the system cannot recover an interrupted operation.
Distinguish mechanisms. Locks coordinate access under a defined protocol; permissions control allowed access; backups support recovery from particular losses. None replaces the others. A user entitled to read a file may not be entitled to update it, and a locked operation can still implement incorrect business logic. Analyse each boundary separately.
Connect to departments and workload. IT manages configuration, users report symptoms and managers set service priorities. Interactive customer work and background reporting can have different latency needs. Review capacity and wellbeing rather than assuming every delay should trigger more alerts. The classroom model offers reasoning tools, not a command to reconfigure devices, bypass permissions or stop real processes.
Research: evaluate models against operational evidence
A study might compare scheduler policies under a defined synthetic workload, then examine which assumptions fail in a real environment. Report response, waiting and turnaround separately. A lower average can hide a poor worst case. Vary arrival patterns and duration uncertainty in a future extension before claiming broad performance superiority.
Research reliability through invariants and failures. For a transaction counter, every accepted increment should remain represented under the stated model. Trace interleavings and expected recovery states. Passing a few deterministic tests establishes only those tested cases, not concurrency safety of a deployed system. Real storage and process behaviour require a separate controlled experiment.
Submit scheduling tables, invariant statements, race traces and a limitation memo. Explain who owns a process, whom delays affect, whose permissions apply, what state is shared, where work waits, when completion occurs, why a policy fits, which failure remains and how recovery is checked. Use the free OSTEP chapters for deeper study of processes, scheduling, concurrency and persistence. Our scripts are original teaching simulations and do not reproduce the textbook's assignments or modify the learner's computer.
Study questions and answers
Distinguish process and program.
A program is instructions; a process is an executing instance with state/resources. Multiple processes need coordination and isolation. Indicative marking: Concept/result 3; reasoning 3; application 2; limitation 2.
Compare scheduling of 5, 2, 1 with arrivals at zero.
FCFS in input order gives waits 0, 5, 7: mean 4, mean turnaround 20/3. SJF in order 1, 2, 5 gives waits 0, 1, 3: mean 4/3, mean turnaround 4. Zero overhead and known durations assumed. Indicative marking: Concept/result 3; reasoning 3; application 2; limitation 2.
Explain a lost counter increment.
Both workers read 0 and write 1, so the final value is 1 instead of 2. Coordinate the read-modify-write operation; the deterministic model is not a real thread benchmark. Indicative marking: Concept/result 3; reasoning 3; application 2; limitation 2.
Evaluate scheduler simulations.
Report distribution and worst cases as well as means; vary arrivals and duration uncertainty and disclose limits before applying to real systems. Indicative marking: Concept/result 3; reasoning 3; application 2; limitation 2.
Extended practice questions
Distinguish process and program.
A program is instructions; a process is an executing instance with state/resources. Multiple processes need coordination and isolation.
Marking guide: Concept/result 3; reasoning 3; application 2; limitation 2.
Marks: 10
Compare first-come, first-served and non-preemptive shortest-job-first scheduling for jobs of durations 5, 2 and 1, all arriving at time zero.
FCFS in input order gives waiting times 0, 5 and 7 (mean 4) and turnaround times 5, 7 and 8 (mean 20/3). SJF in order 1, 2, 5 gives waiting times 0, 1 and 3 (mean 4/3) and turnaround times 1, 3 and 8 (mean 4). This assumes known durations, zero overhead, simultaneous arrivals and non-preemptive execution.
Marking guide: Concept/result 3; reasoning 3; application 2; limitation 2.
Marks: 10
Explain a lost counter increment.
Both workers read 0, independently add 1 and each writes 1, so the final value is 1 instead of 2. Coordinate the read–modify–write critical section; the deterministic interleaving is not a real thread benchmark.
Marking guide: Concept/result 3; reasoning 3; application 2; limitation 2.
Marks: 10
Evaluate scheduler simulations.
Report distribution and worst cases as well as means; vary arrivals and duration uncertainty and disclose limits before applying to real systems.
Marking guide: Concept/result 3; reasoning 3; application 2; limitation 2.
Marks: 10
A report job and a booking service compete for resources on one machine. How should an operating-systems investigation connect to the business?
Identify whether processing, memory, storage access or another resource is limiting the relevant tasks. Measure the booking response and report completion separately, noting timing and other activity. A slow report does not automatically prove insufficient memory, and a busy processor is not a complete diagnosis. Compare scheduling, workload separation or a justified capacity change. Operations identifies the important service periods, while technical staff collect appropriate evidence. The manager decides the tradeoff between report timeliness and customer interaction. Use a bounded local exercise rather than altering an unfamiliar production machine.
Marking guide: Resource diagnosis; task/time measurements; alternatives; priorities; local safety boundary. Indicative allocation: reasoning 4; application or workings 3; assumptions and limits 3.
Marks: 10
Compare a running process with a file stored on disk.
A process is an executing program instance with resources and operating-system state. A file is stored information that may contain program instructions, data or another object. Removing a file is not a reliable general method for stopping a process, and a stored executable is not evidence that it is currently running. Identify the process and its work before taking an action. Preserve records needed for diagnosis and use an appropriate local test procedure. Business continuity depends on understanding which service the process supports, not merely recognising a filename or a resource spike.
Marking guide: Execution versus stored object; no delete-to-stop assumption; identification; diagnosis/continuity. Indicative allocation: reasoning 4; application or workings 3; assumptions and limits 3.
Marks: 10
A synthetic machine has 8,192 MB available in the exercise. The baseline uses 2,048 MB and three applications each use 1,536 MB. Calculate the stated total and remaining capacity.
The applications use 3 × 1,536 = 4,608 MB. Adding the baseline gives 6,656 MB, leaving 8,192 − 6,656 = 1,536 MB under the exercise assumptions. This static total omits additional overhead, peaks, shared memory and storage-related behaviour. It does not prove that another application of that size will operate satisfactorily. Use consistent units and distinguish observed memory measurements from allocated limits. A manager should consider the service consequence of resource pressure, while technical staff test realistic workloads rather than treating a single arithmetic snapshot as a performance guarantee.
Marking guide: 4,608 apps; 6,656 total; 1,536 remaining; static omissions; no performance guarantee. Indicative allocation: reasoning 4; application or workings 3; assumptions and limits 3.
Marks: 10
Specify a local operating-system observation lab with a clear scope.
Use your own test environment, synthetic files and an ordinary reporting task. Record elapsed time and relevant resource observations under an idle and a busier condition. Keep the workload and measurement definitions explicit. Do not kill unfamiliar processes or change protected configuration merely to produce a dramatic result. Explain alternative causes and repeat only when a difference needs investigation. Link the observations to a business question about timeliness or responsiveness. The lab demonstrates disciplined measurement in a bounded environment; it does not establish a production tuning recommendation or a diagnosis of every operating-system issue.
Marking guide: Owned local scope; explicit workload/measurements; no unfamiliar destructive changes; alternatives; bounded interpretation. Indicative allocation: reasoning 4; application or workings 3; assumptions and limits 3.
Marks: 10
Revision cards
Why inspect process identity as well as a process name?
The identity and privileges determine what the process may access; a name alone does not establish legitimacy or authority. Record the relevant environment and owner. Avoid granting broad permissions merely to make an unexplained laboratory task run.
A report job and a booking service compete for resources on one machine. How should an operating-systems investigation connect to the business?
Measure the affected tasks and resource behaviour before diagnosing. Connect the technical bottleneck to service priorities and test changes locally.
Compare a running process with a file stored on disk.
A process is executing state; a file is stored information. Identify the running service and appropriate control instead of treating a filename as the process.
A synthetic machine has 8,192 MB available in the exercise. The baseline uses 2,048 MB and three applications each use 1,536 MB. Calculate the stated total and remaining capacity.
Stated use 6,656 MB; remaining 1,536 MB. Static arithmetic omits peaks and overhead and does not guarantee another application will run well.
Specify a local operating-system observation lab with a clear scope.
Observe a defined local task under stated conditions and record alternative causes. Avoid unfamiliar process changes and limit the conclusion to the tested environment.
What can a file permission test demonstrate?
It can show whether specified identities can perform specified operations under the tested conditions. It does not prove complete system security. Include permitted and denied cases, recording the configuration so a later environment change does not inherit the result automatically.
Why distinguish memory use from persistent storage use?
Memory supports active execution; persistent storage holds data beyond the process lifetime. Pressure on one is not evidence of pressure on the other. Inspect suitable measurements before choosing to increase RAM, delete files or change application behaviour.
How should a laboratory treat a failed command?
Record the command, environment, output and current state before changing anything. Identify whether it partly completed. Repeated execution without checking state can obscure the cause or duplicate an operation; an error message is evidence to interpret, not a reason to guess.
What makes an operating-system experiment reproducible?
Specify the system version, inputs, permissions, steps, expected observations and cleanup. Another learner should know the limits of comparison. A screenshot of one successful run cannot establish that the same commands are appropriate on every machine.
Practice task
Complete evidence-systems-workshop.html, calculate the fixture and submit the subject portfolio.
Sources and further reading
- Strategy and responsible systems workshop
Type: Original local practice
Use: Test bounded scenarios and explain exclusions. - OSTEP: free author-hosted chapters
Type: Free primary further reading
Use: Related conceptual material; not credit or complete syllabus coverage.