How does an operating systemโs security function protect against unauthorized access?
How does disk formatting contribute to file system management?
Explain context switching and its impact on system performance.
Differentiate between a process and a program with an example.
How does virtual memory use paging to manage memory constraints?
Answers
Answer: The OS uses authentication (e.g., passwords), access controls (e.g., permissions), and encryption to prevent unauthorized access to system resources.
Description: Security mechanisms like user authentication and file permissions ensure only authorized users access sensitive data, as seen in Linuxโs user/group-based permissions.Answer: Disk formatting protects a storage device by creating a file system structure, defining how data is stored and accessed, and erasing existing data.
Description: Formatting sets up tracks, sectors, and file allocation tables (e.g., FAT32 or NTFS), ensuring efficient data organization and access, critical for new or corrupted drives.Answer: Context switching saves the state of a running process and loads another, enabling multitasking, but frequent switches can reduce performance due to overhead.
Description: The OS uses the PCB to save and restore process states. Excessive switching, as in overloaded systems, increases CPU overhead, slowing performance, as seen in task-heavy Linux servers.Answer: A program is a passive set of instructions (e.g., a text editorโs code), while a process is an active instance of a program in execution (e.g., running the text editor).
Description: A program is static, stored on disk, while a process includes runtime elements like memory and CPU usage. For example, notepad.exe is a program; its running instance is a process.Answer: Virtual memory uses paging to map virtual addresses to physical memory or disk, allowing processes to run despite limited physical RAM.
Description: Paging divides memory into pages, swapping them to disk when RAM is full. This enables large programs to run, as seen in Windowsโ pagefile.sys, but excessive swapping slows performance.