CH2 MCQS Flashcards

(28 cards)

1
Q

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

A

c) Data compression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which OS service ensures proper resource allocation when multiple processes
execute simultaneously?
a) Logging
b) Error detection
c) Resource allocation
d) Debugging

A

c) Resource allocation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

b) Keeping track of resource usage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

c) Requires memorization of commands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which interface type does not provide user interaction in real time?
a) GUI
b) Batch processing
c) CLI
d) Touch-based interface

A

b) Batch processing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which interface allows direct command input and execution?
a) CLI
b) GUI
c) Hybrid
d) Touchscreen

A

a) CLI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which of the following is NOT a system call category?
a) Process control
b) File management
c) Data visualization
d) Communication

A

c) Data visualization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which API is most commonly used in UNIX-based OSes?
a) Win32 API
b) POSIX API
c) Java API
d) Python API

A

b) POSIX API

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

ich system call is used to create a new process in UNIX/Linux?
a) exec()
b) fork()
c) open()
d) close()

A

b) fork()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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

A

c) Passing parameters on a USB drive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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

A

b) An error code is returned

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which OS structure allows direct interaction between applications and
hardware?
a) Monolithic
b) Microkernel
c) Layered
d) Hybrid

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which OS structure moves most system components to user space?
a) Monolithic
b) Microkernel
c) Layered
d) Modular

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which OS structure uses dynamically loadable modules?
a) Monolithic
b) Layered
c) Modular
d) Hybrid

17
Q

What is the biggest drawback of a layered OS structure?
a) Poor security
b) Complex debugging
c) Increased system overhead
d) Less modularity

A

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.

18
Q

What is a benefit of using a microkernel structure?
a) Better security
b) Faster execution
c) Direct hardware access
d) Simple debugging

A

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.

19
Q

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

A

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.

20
Q

Which OS is built using a hybrid kernel?
a) Windows
b) Linux
c) macOS
d) DOS

21
Q

Which of the following is NOT a Unix-based OS?
a) FreeBSD
b) macOS
c) Windows
d) Linux

22
Q

Which mechanism ensures that multiple processes can communicate
efficiently in a modern OS?
a) Polling
b) Message Passing
c) Timer Interrupts
d) BIOS Calls

A

b) Message Passing

23
Q

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

A

b) To analyze the memory state of a crashed process

25
Which of the following is an indicator of high CPU contention in an OS? a) Low CPU utilization b) High context switch rate c) Low memory usage d) High idle time
b) High context switch rate Why? CPU contention occurs when multiple processes compete heavily for CPU resources, leading to performance issues. One key indicator of high CPU contention is a high context switch rate.
26
What is the primary function of a firewall in an OS? a) Block unauthorized network access b) Speed up network connections c) Manage system logs d) Encrypt data files
a) Block unauthorized network access
27
Which OS mechanism prevents unauthorized access to a system resource? a) Mutex b) Access Control List (ACL) c) Process Table d) Cachi
b) Access Control List (ACL)
28
Which security feature in an OS ensures that one process does not access another process's memory space? a) Paging b) Address Space Isolation c) Swapping d) File Locking
b) Address Space Isolation