FIT2100 Chap.2 Operating Systems and System Calls
Operating Systems and System Calls
An operating system offers abstractions while controlling shared resources. Applications see processes, files, address spaces and communication endpoints instead of raw controller registers. The kernel schedules processor time, manages memory, protects files and coordinates devices.
User mode and kernel mode separate ordinary computation from privileged operations.
A system call is the controlled route across that boundary. A library wrapper arranges arguments, the architecture enters trusted code, the kernel validates the request and performs the service, and a result or error returns to user mode.
Understanding that route prevents a common confusion between a convenient application function and the protected operation beneath it.
What this chapter covers
- 01
Operating system objectives
- 02
Resource management and abstraction
- 03
User mode and kernel mode
- 04
Protected instructions and memory
- 05
System-call entry and return
- 06
Process and file services
- 07
Error reporting
- 08
Linux and Unix architecture
Worked example · free
Explain an open-file request
- +2The wrapper packages the path and access flags, then invokes a system-call entry rather than directly manipulating disk hardware.
- +2Kernel code validates the user pointer, resolves the path, checks permissions and creates or finds the open-file state.
- +2A process-local descriptor or an error code returns to user mode. Later reads use the descriptor to identify the kernel-managed object.
Key terms
- Kernel Mode
- The privileged processor mode in which operating-system code may execute protected instructions and access protected regions.
- User Mode
- The restricted execution mode used by ordinary application code to limit direct control of system resources.
- System Call
- A controlled request from a process for a kernel-managed service.
- System Service
- A function supplied by the operating system, such as program execution, file access, communication or error handling.
- File Descriptor
- A small process-local identifier referring to an open kernel-managed resource.
- Resource Manager
- The operating-system role that allocates processors, memory, storage and devices among competing requests.
Operating Systems and System Calls FAQ
Why can an application not access every device directly?
Direct access would let untrusted code bypass protection, interfere with other processes and depend on device-specific register layouts. Kernel services validate requests, coordinate sharing, report failures and present a stable abstraction above different hardware.
Is a system call just a normal function call?
It may be reached through a function-like wrapper, but the essential action is a controlled privilege transition. The processor enters kernel code, validates arguments and later restores user execution. An ordinary same-mode function call does not provide that authority change.
What does a file descriptor contain?
The descriptor is an index or handle used by one process, not the file data itself. Kernel tables connect it to an open object containing access mode, current offset and related state. Another process can use the same number for an unrelated object.
How should system-call errors be explained?
Name the validation or resource condition that failed, such as an invalid address, missing path, denied permission or exhausted table. A negative result should be interpreted through the documented interface rather than treated as a generic operating-system crash.
Assessment move
Group calls by the object they manage: processes, memory, files, devices and communication. For each group, write the user request, kernel validation and return value. Rehearse one success path and one controlled failure. In a laboratory explanation, distinguish a library wrapper from the kernel action and explain why the boundary exists.
Avoid memorising names without service roles, since interfaces vary while the protection and resource-management responsibilities remain stable. Make a boundary ledger for representative calls. Record the user-space arguments, the object the kernel must locate, the permission or validity checks, the persistent kernel state created or changed, and the success or error return.
Use the same ledger for file opening, process creation and one communication operation so common structure becomes visible without erasing their differences. For error revision, start from a negative result and work backwards: decide whether the failure could arise while copying arguments, resolving an identifier, checking authority or performing the operation.
Pair every call name you learn with a sentence beginning “the kernel must” and another beginning “the caller receives.” Practise separating mechanism from policy by changing a scheduling or caching decision while keeping the controlled entry mechanism constant. In lab preparation, design one safe failing input before execution and predict both the returned status and which resource must remain unchanged.
After running it, explain discrepancies using documented state rather than assuming a library routine bypassed the kernel. End each topic by replacing operating-system jargon with a resource-and-authority description; if the description no longer identifies the protected object or responsible layer, the original answer was probably memorised rather than understood.
Working through Operating Systems and System Calls in FIT2100? Sia is AskSia’s AI Computer Science tutor — ask any FIT2100 Operating Systems and System Calls question and get a clear, step-by-step explanation grounded in how FIT2100 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.