1/21
Flashcards about Operating Systems: System Calls
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Operating System
Manages and allocates resources; performs tasks like file, memory, and process management, I/O handling, security, and multitasking.
Main Tasks of an Operating System
File management, Memory management, Process management, Input/Output handling, Security & Access Control, Multitasking & Scheduling.
Types of Kernels
Monolithic and Micro-kernels
Related to Processes/Threads
Processes and Threads
Scheduling
Ensures efficient CPU utilization and fair process execution.
System Calls
Controlled entry points into the kernel, allowing user-mode applications to request privileged operations.
Why System Calls are Essential
Communication between user programs and the OS; provides an interface for requesting OS services.
Examples of Privileged Operations Requested via System Calls
Accessing hardware, file systems, or network resources.
Examples of Operations Provided by System Calls
Process management, I/O, security, and IPC.
API in Operating Systems
Interface provided by the OS, often in C/C++, that simplifies interaction compared to raw system calls.
System Call Definition
A function call into OS code that runs at a higher privilege level of the CPU.
Higher Privilege Level Importance
Sensitive operations are allowed only at a higher privilege level.
Why a Well-Defined Mechanism is Needed
To ensure security and stability when switching from user-space to kernel-space.
Simple Overview of a System Call
Switch from user-space to kernel-space, verify security permissions, perform the system call, and switch back.
Two Classes of Entry Points to Kernel Mode
Interrupts and Exceptions
Interrupts
Generated by devices to signal needing attention.
int 0x80
Software interrupt instruction used to make system calls to the kernel (in 32-bit Linux systems).
Security Verification when Using System Calls
The OS ensures the request is secure and valid before executing it.
Primary Communication Method in Micro-Kernels
Message-passing
Per-Process Virtualized Devices
Each process interacts with its own virtual instance of a device.
Why Use System Calls?
Provides a standardized way to use hardware resources, prevents direct access to critical system resources, and simplifies complex hardware interactions.
Key Role of System Calls
Enables user programs to request services from the OS, involving a switch between user mode and kernel mode.