Operating Systems – Chapter 2:
Operating System Structures
1. System Boot
• Booting = loading the kernel into memory and starting the OS.
• Bootstrap loader (in ROM/EEPROM) initializes hardware and loads OS.
• GRUB = open-source bootstrap for Linux.
2. Operating System Services
User-facing: program execution, I/O, file-system manipulation, communication, error
detection.
System-facing: resource allocation, accounting, protection & security.
3. Operating System Interfaces
• CLI: Text-based (e.g., bash, shell).
• GUI: Graphical (e.g., Windows).
• Touchscreen UI: Gesture/voice based.
4. System Calls
• Interface between a program and the OS.
• Accessed via APIs (Win32, POSIX, Java).
• Types: process, file, device, info, communication, protection.
• Parameters: registers, memory table, stack.
5. System Programs
• Provide tools/utilities for program dev. and execution.
• Includes: file tools, compilers, debuggers, daemons, status checkers.
6. Linkers and Loaders
• Linker: merges object files → executable.
• Loader: loads executable into memory.
• DLLs: dynamically loaded libraries.
7. OS Design & Implementation
• User goals: ease of use, speed, safety.
• System goals: maintainability, efficiency.
• Languages: C, C++, Assembly, scripts.
8. OS Structures
• Simple: MS-DOS (no structure).
• Monolithic: UNIX (single level).
• Layered, Microkernel, Modular, Hybrid.
9. Android & macOS
• macOS: Aqua + Cocoa + Darwin (Mach + BSD).
• Android: Java + Linux + .dex format.
10. Debugging
• Tools: core dump, crash dump, logging, tracing.
• Performance monitoring and error analysis.
Sample Multiple-Choice Questions
1. 1. Which of the following is an example of a system call used for process control?
A) fork()
B) printf()
C) write()
D) chmod()
✅ Answer: A
2. 2. Which parameter passing technique allows for an unlimited number of parameters?
A) Using CPU registers
B) Stack-based parameter passing
C) Only through fixed-length arrays
D) Pointer passing without memory
✅ Answer: B
3. 3. What is a key benefit of using a microkernel architecture?
A) Faster performance
B) Greater memory usage
C) Simplified communication
D) Higher security and modularity
✅ Answer: D
4. 4. What does a loader do in an OS?
A) Reads and compiles source code
B) Combines object files into executables
C) Loads the executable into memory for execution
D) Checks disk space and file permissions
✅ Answer: C
5. 5. Why are dynamically linked libraries (DLLs) used?
A) To reduce disk space and memory use
B) To improve static security
C) To prevent crashes
D) To block system calls
✅ Answer: A