What is the primary difference between user mode and kernel mode in an operating system?
A Process Scheduling
B Memory Allocation
C Resource Access
D Task Prioritization
The key difference between user mode and kernel mode is that in user mode, processes have restricted access to system resources, while in kernel mode, the OS has unrestricted access to hardware and system resources.
Which of the following is true about kernel mode?
A Full Hardware Control
B Limited Resource Access
C Safe for User Applications
D Cannot Access Memory
In kernel mode, the operating system has full control over system resources, including memory, CPU, and hardware devices. It is used for executing critical tasks and managing system operations.
What does the boot process involve when starting an operating system?
A Scheduling Processes
B Managing I/O Devices
C Allocating Memory
D Loading the Kernel
The boot process involves loading the kernel into memory, initializing hardware, and setting up the system to begin executing user applications. This is the first step in making the system ready for use.
What is the main purpose of interprocess communication (IPC)?
A Share Resources
B Share Data Between Processes
C Process Synchronization
D Process Creation
IPC enables processes to communicate and exchange data with each other. It provides mechanisms like pipes, message queues, and semaphores to synchronize actions and ensure efficient data transfer.
Which of the following methods is commonly used for interprocess communication?
A Task Scheduling
B Page Swapping
C Message Passing
D File Allocation
Message passing is a common IPC technique where processes communicate by sending and receiving messages. It is used in systems that require communication across different processes, often in distributed or parallel computing environments.
What happens in kernel mode that is not allowed in user mode?
A Device I/O
B Memory Access
C Network Communication
D File Access
Kernel mode allows full access to hardware resources, including device I/O operations. In contrast, user mode has limited access and cannot directly interact with hardware, ensuring system security and stability.
Which of the following is an example of interprocess communication using shared memory?
A Message Queues
B Semaphores
C Shared Variables
D Pipes
Shared memory allows multiple processes to communicate by accessing the same memory space. Shared variables are used to exchange data between processes in a fast and efficient manner, though synchronization is required to prevent conflicts.
What is the role of the system call exec() in the operating system?
A Terminate a Process
B Execute a Program
C Create a New Process
D Allocate Memory
The exec() system call replaces the current process image with a new program. It allows processes to run different programs by loading the specified program into memory and executing it in place of the calling process.
How does the operating system ensure safety between processes in kernel mode?
A Task Scheduling
B Resource Allocation
C Process Isolation
D Memory Swapping
In kernel mode, the operating system ensures process isolation by protecting each processโs memory space. This prevents one process from interfering with or accessing the memory of another process, ensuring system stability and security.
What is the purpose of the fork() system call?
A Create a New Process
B Terminate a Process
C Execute a Program
D Read Data
The fork() system call creates a new process by duplicating the calling process. The child process is created as an exact copy of the parent, but it can execute independently after the fork.
Which of the following is a key aspect of interprocess communication in a distributed system?
A Shared Memory
B File Allocation
C Resource Scheduling
D Message Passing
In distributed systems, processes on different machines communicate using message passing. This allows for communication across networked systems, facilitating data exchange, coordination, and synchronization between processes running on separate devices.
What is the main advantage of using semaphores in interprocess communication?
A Data Synchronization
B Task Scheduling
C File Management
D Resource Allocation
Semaphores are synchronization tools used to manage concurrent access to shared resources, ensuring that only one process accesses a critical section at a time. This prevents race conditions and ensures data integrity.
What happens when a process transitions from user mode to kernel mode?
A The OS Allocates Resources
B A System Call is Made
C The Process Terminates
D Memory is Released
When a process needs to perform privileged operations (e.g., accessing hardware), it triggers a system call, which transitions the process from user mode to kernel mode, allowing it to access restricted resources.
How does the boot process handle device drivers?
A Loads Device Drivers into Memory
B Allocates Resources for Devices
C Configures Device Settings
D Executes System Calls
During the boot process, the operating system loads device drivers into memory. These drivers allow the OS to interact with hardware devices, enabling proper functioning of peripherals like keyboards, printers, and storage devices.
What is the role of a process scheduler in an operating system?
A Manage System Resources
B Handle Memory Allocation
C Assign CPU Time to Processes
D Control I/O Operations
The process scheduler is responsible for determining which process gets access to the CPU at any given time. It uses various algorithms to allocate CPU time efficiently and ensure fair process execution in a multitasking environment.