CH2 MCQS Flashcards
(28 cards)
Which of the following is NOT an OS service provided to the user?
a) Program execution
b) File system manipulation
c) Data compression
d) Communication
c) Data compression
Which service is responsible for ensuring that processes do not interfere with
each other?
a) Communication
b) Protection and security
c) File-system manipulation
d) Logging
b) Protection and security
Why?
The Protection and Security service ensures that processes remain isolated and do not interfere with each other, protecting system stability and user data through memory protection, access control, and authentication.
Why Are the Other Options Incorrect?
A) Communication services handle inter-process communication (IPC), like message passing and shared memory, but do not enforce protection between processes.
C) File-system manipulation deals with creating, deleting, and accessing files, not process isolation or security.
D) Logging records system events and errors but does not prevent processes from interfering with each other.
Which of the following is NOT an I/O operation service provided by an OS?
a) Reading from files
b) Writing to files
c) Managing hardware directly
d) Requesting input from the keyboard
c) Managing hardware directly
Why?
An Operating System (OS) provides I/O operation services that allow programs to interact with hardware indirectly through system calls. However, the OS itself does not manage hardware directly; instead, it relies on device drivers and hardware controllers to perform low-level operations.
Which OS service ensures proper resource allocation when multiple processes
execute simultaneously?
a) Logging
b) Error detection
c) Resource allocation
d) Debugging
c) Resource allocation
What is the purpose of system logging in an OS?
a) Storing user credentials
b) Keeping track of resource usage
c) Scheduling CPU execution
d) Preventing unauthorized access
b) Keeping track of resource usage
Which of the following is a disadvantage of CLI over GUI?
a) Harder to automate tasks
b) More memory usage
c) Requires memorization of commands
d) Uses more system resources
c) Requires memorization of commands
Which interface type does not provide user interaction in real time?
a) GUI
b) Batch processing
c) CLI
d) Touch-based interface
b) Batch processing
Which interface allows direct command input and execution?
a) CLI
b) GUI
c) Hybrid
d) Touchscreen
a) CLI
Which of the following is NOT a system call category?
a) Process control
b) File management
c) Data visualization
d) Communication
c) Data visualization
Which API is most commonly used in UNIX-based OSes?
a) Win32 API
b) POSIX API
c) Java API
d) Python API
b) POSIX API
ich system call is used to create a new process in UNIX/Linux?
a) exec()
b) fork()
c) open()
d) close()
b) fork()
Which of the following is NOT a parameter passing method in system calls?
a) Passing parameters in registers
b) Passing parameters in a memory block
c) Passing parameters on a USB drive
d) Passing parameters on the stack
c) Passing parameters on a USB drive
What happens when a system call fails?
a) The OS crashes
b) An error code is returned
c) The kernel restarts
d) The hardware gets reset
b) An error code is returned
Which OS structure allows direct interaction between applications and
hardware?
a) Monolithic
b) Microkernel
c) Layered
d) Hybrid
a) Monolithic
Why?
A monolithic operating system is a type of OS structure where the entire OS, including the kernel, device drivers, file system, and system calls, operates in a single large block of code in kernel mode. This allows direct interaction between applications and hardware without needing inter-process communication (IPC) or extra layers.
Which OS structure moves most system components to user space?
a) Monolithic
b) Microkernel
c) Layered
d) Modular
b) Microkernel
Why?
A Microkernel OS structure is designed to minimize the kernel’s responsibilities by moving most system components (such as device drivers, file systems, and system services) to user space, while only essential functions remain in kernel space.
Why Are the Other Options Incorrect?
A) In a monolithic OS, all components run in kernel space, allowing direct hardware access but making the system less modular and more prone to crashes.
C) A layered OS organizes system functions into hierarchical layers, but does not necessarily move most components to user space.
D) Modular kernels (e.g., Linux) allow loading and unloading of kernel modules dynamically but do not move most components to user space.
Which OS structure uses dynamically loadable modules?
a) Monolithic
b) Layered
c) Modular
d) Hybrid
c) Modular
What is the biggest drawback of a layered OS structure?
a) Poor security
b) Complex debugging
c) Increased system overhead
d) Less modularity
c) Increased system overhead
Why?
Since each layer communicates with the one below it, function calls and data transfers must go through multiple layers.
This results in more processing time and higher system overhead, making the OS slower compared to monolithic designs.
Performance can suffer, especially for system calls that need to traverse many layers.
What is a benefit of using a microkernel structure?
a) Better security
b) Faster execution
c) Direct hardware access
d) Simple debugging
a) Better security
Why?
A microkernel OS improves security by isolating most system components (drivers, file systems) in user space, reducing the risk of crashes and attacks. Since only essential functions run in kernel mode, faults in one component don’t affect the entire system.
Why not the other options?
B) Microkernels are slower due to inter-process communication (IPC).
C) Restricted; drivers run in user space for security.
D) Debugging is more complex due to modular design.
What is a crash dump?
a) A log of user commands
b) A snapshot of kernel memory after a system failure
c) A backup of user data
d) A report of installed software
b) A snapshot of kernel memory after a system failure
Why?
A crash dump is a snapshot of the kernel memory (RAM) taken after a system failure (crash). It is used for diagnosing and debugging the cause of the failure.
How a Crash Dump Works:
When a system crashes due to a critical error (e.g., kernel panic, BSOD in Windows), the OS records the current state of the kernel memory.
The crash dump file is saved to disk before the system reboots.
System administrators or developers use debugging tools to analyze the crash dump and determine what caused the failure.
Which OS is built using a hybrid kernel?
a) Windows
b) Linux
c) macOS
d) DOS
a) Windows
Which of the following is NOT a Unix-based OS?
a) FreeBSD
b) macOS
c) Windows
d) Linux
c) Windows
Which mechanism ensures that multiple processes can communicate
efficiently in a modern OS?
a) Polling
b) Message Passing
c) Timer Interrupts
d) BIOS Calls
b) Message Passing
What is the purpose of a core dump file?
a) To store user files permanently
b) To analyze the memory state of a crashed process
c) To record user login history
d) To optimize CPU scheduling
b) To analyze the memory state of a crashed process