Mock Quiz Hub
Dark
Mock Quiz Hub
1
Recent Updates
Added: OS Mid 1 Quiz
Added: OS Mid 2 Quiz
Added: OS Lab 1 Quiz
Check back for more updates!
Time: 00:00
Quiz
Navigate through questions using the controls below
0%
Question 1 of 60
Quiz ID: q1
Which of the following components is NOT part of a process's memory layout?
Text section
Stack
Program counter
Heap
Question 2 of 60
Quiz ID: q2
What happens during a context switch?
The CPU switches from user mode to kernel mode
The state of the current process is saved and the state of the next process is loaded
A process creates a new child process
A process terminates and releases all its resources
Question 3 of 60
Quiz ID: q3
In process scheduling, what is the main purpose of the ready queue?
To hold processes waiting for I/O operations to complete
To store processes that have terminated but haven't been cleaned up
To maintain processes that are ready to execute but waiting for CPU time
To keep track of all processes currently executing on the CPU
Question 4 of 60
Quiz ID: q4
What is a zombie process?
A process that has terminated but whose parent has not yet called wait()
A process that is running but not responding to signals
A process that has been terminated by the operating system due to excessive resource usage
A process that has no parent process (init becomes its parent)
Question 5 of 60
Quiz ID: q5
In the producer-consumer problem with bounded buffer, why can only BUFFER_SIZE-1 elements be used?
To avoid race conditions between producer and consumer
To distinguish between full and empty buffer states
One buffer space is reserved for the operating system
The counter variable requires one buffer space for synchronization
Question 6 of 60
Quiz ID: q6
What is the main difference between ordinary pipes and named pipes?
Ordinary pipes are bidirectional while named pipes are unidirectional
Named pipes require a parent-child relationship while ordinary pipes do not
Ordinary pipes can be used over a network while named pipes cannot
Named pipes can be accessed by unrelated processes while ordinary pipes require a parent-child relationship
Question 7 of 60
Quiz ID: q7
In message passing IPC, what is a rendezvous?
When two processes share a common mailbox
When both send and receive operations are blocking
When messages are temporarily cached in a queue
When a link is associated with exactly two processes
Question 8 of 60
Quiz ID: q8
What is the purpose of the Mach port mechanism?
To provide hardware-level memory protection
To enable message-based communication between tasks
To implement virtual memory management
To schedule processes on multiple CPUs
Question 9 of 60
Quiz ID: q9
In RPC systems, what is the function of the stub?
To allocate memory for the remote procedure
To marshal parameters and locate the server
To authenticate the client to the server
To encrypt the communication between client and server
Question 10 of 60
Quiz ID: q10
What problem does the External Data Representation (XDR) format solve in RPC?
Network latency issues
Different data representations across architectures
Security vulnerabilities in remote calls
Memory allocation in distributed systems
Question 11 of 60
Quiz ID: q11
In Android's process importance hierarchy, which process type is most likely to be terminated when memory is needed?
Foreground process
Visible process
Service process
Empty process
Question 12 of 60
Quiz ID: q12
What is the primary advantage of Chrome's multiprocess architecture?
Faster webpage loading
Improved security and stability
Reduced memory usage
Better compatibility with web standards
Question 13 of 60
Quiz ID: q13
In the Windows CreateProcess API, what is the purpose of the STARTUPINFO structure?
To specify security attributes for the new process
To define the window station, desktop, standard handles, and appearance of the main window
To set the priority class of the new process
To determine the memory allocation for the new process
Question 14 of 60
Quiz ID: q14
What is cascading termination?
When a process terminates all its child processes before exiting
When the operating system terminates a process and all its descendants
When multiple processes terminate simultaneously due to a system error
When a parent process waits for all children to terminate before exiting
Question 15 of 60
Quiz ID: q15
In POSIX shared memory, what is the purpose of the shm_open() function?
To allocate physical memory for a process
To create or open a shared memory object
To map shared memory into a process's address space
To synchronize access to shared memory
Question 16 of 60
Quiz ID: q16
What is the main difference between shared memory and message passing IPC?
Shared memory is faster but requires explicit synchronization
Message passing is faster but uses more memory
Shared memory works only between related processes
Message passing is implemented in hardware while shared memory is software-based
Question 17 of 60
Quiz ID: q17
In a socket communication, what does the port number 127.0.0.1:6013 represent?
A remote server on the internet
A loopback connection to the local system
A broadcast address for the local network
A reserved port for system services
Question 18 of 60
Quiz ID: q18
What is the race condition demonstrated in the producer-consumer example with a counter?
Both processes might try to access the buffer simultaneously
The counter might not reflect the actual number of items in the buffer
The producer might overwrite unconsumed items
The consumer might try to read from an empty buffer
Question 19 of 60
Quiz ID: q19
In indirect communication with mailboxes, what problem arises when multiple processes share a mailbox?
Messages might be delivered to the wrong process
The mailbox might become corrupted
It's unclear which process should receive a message
Messages might be lost if the mailbox is full
Question 20 of 60
Quiz ID: q20
What is the purpose of the mmap() function in POSIX shared memory?
To create a shared memory object
To set the size of a shared memory object
To map a shared memory object into the process's address space
To synchronize access to shared memory
Question 21 of 60
Quiz ID: q21
In the process state diagram, what transition occurs when an I/O or event wait completes?
Waiting → Running
Waiting → Ready
Ready → Running
Running → Waiting
Question 22 of 60
Quiz ID: q22
What information is typically stored in a Process Control Block (PCB)?
The entire program code and data
Process state, program counter, CPU registers, and scheduling information
Only the process ID and parent process ID
The contents of all files opened by the process
Question 23 of 60
Quiz ID: q23
Why is context switch time considered overhead?
It requires privileged kernel mode operations
The CPU is not doing useful work during the switch
It consumes significant memory resources
It causes cache misses and pipeline stalls
Question 24 of 60
Quiz ID: q24
In mobile systems like iOS, what distinguishes a foreground process from a background process?
Foreground processes have higher priority
Foreground processes are controlled via the user interface
Background processes cannot perform I/O operations
Foreground processes have access to more memory
Question 25 of 60
Quiz ID: q25
What is the main purpose of the wait() system call?
To pause a process for a specified time interval
To wait for a child process to terminate
To wait for an I/O operation to complete
To wait for a signal from another process
Question 26 of 60
Quiz ID: q26
In the process creation hierarchy, what is the typical relationship between parent and child processes regarding resources?
Children always inherit all of their parent's resources
Children never inherit any of their parent's resources
The resource sharing depends on the options specified during process creation
Children inherit resources but cannot share them with the parent
Question 27 of 60
Quiz ID: q27
What is the significance of the init process (pid = 1) in Unix-like systems?
It is the first process started by the kernel
It has the highest priority in the system
It manages all hardware devices
It handles all user authentication
Question 28 of 60
Quiz ID: q28
In the producer-consumer problem, what is the difference between bounded-buffer and unbounded-buffer approaches?
Bounded-buffer has limited size while unbounded-buffer has practically unlimited size
Bounded-buffer requires synchronization while unbounded-buffer does not
Unbounded-buffer is faster but less reliable
Bounded-buffer works only with shared memory while unbounded-buffer works with message passing
Question 29 of 60
Quiz ID: q29
What is the purpose of the exec() system call in Unix process creation?
To create a new process
To replace the current process's memory space with a new program
To execute a function in a separate thread
To change the priority of a process
Question 30 of 60
Quiz ID: q30
In message passing, what is the difference between direct and indirect communication?
Direct communication uses shared memory while indirect uses messages
Direct communication requires processes to name each other explicitly
Indirect communication is faster but less reliable
Direct communication works only between related processes
Question 31 of 60
Quiz ID: q31
What is the main advantage of using sockets for interprocess communication?
They provide the fastest communication method
They can be used for communication between processes on different systems
They require no synchronization mechanisms
They are implemented entirely in hardware for better performance
Question 32 of 60
Quiz ID: q32
In the Windows LPC mechanism, what is the purpose of the connection port?
To establish the initial connection between client and server
To transfer large amounts of data between processes
To provide security authentication for interprocess communication
To manage memory allocation for message passing
Question 33 of 60
Quiz ID: q33
What problem does the 'dining philosophers problem' illustrate in interprocess communication?
Race conditions in shared memory access
Deadlock in resource allocation
Message passing bottlenecks
Memory fragmentation in process creation
Question 34 of 60
Quiz ID: q34
In Android, what is the role of a service in background processing?
To provide a user interface for background tasks
To perform tasks that can continue even if the background process is suspended
To manage all background processes in the system
To allocate memory resources for background activities
Question 35 of 60
Quiz ID: q35
What is the purpose of the mach_msg() function in the Mach operating system?
To allocate memory for message passing
To create and manage ports for communication
To send and receive messages through ports
To synchronize access to shared resources
Question 36 of 60
Quiz ID: q36
In the context of process scheduling, what is the dispatcher?
The module that selects which process to execute next
The module that performs the context switch
The queue that holds waiting processes
The algorithm that determines process priorities
Question 37 of 60
Quiz ID: q37
What is the main challenge in implementing remote procedure calls (RPC)?
Making remote calls appear as local procedure calls
Ensuring all systems use the same programming language
Preventing unauthorized access to remote procedures
Managing network bandwidth consumption
Question 38 of 60
Quiz ID: q38
In the Chrome browser architecture, what is the purpose of the renderer process?
To manage the user interface and window
To render web pages and execute JavaScript
To handle network communications
To manage browser plugins and extensions
Question 39 of 60
Quiz ID: q39
What is the significance of well-known ports (below 1024) in socket programming?
They provide better security than higher-numbered ports
They are reserved for standard services like HTTP (80) and FTP (21)
They offer faster communication than higher-numbered ports
They are required for communication between different networks
Question 40 of 60
Quiz ID: q40
In the process state model, what causes a transition from Running to Ready state?
An I/O request
A timer interrupt
Process termination
Completion of an I/O operation
Question 41 of 60
Quiz ID: q41
What is the purpose of the ftruncate() function in POSIX shared memory?
To create a shared memory object
To set the size of a shared memory object
To map shared memory into process address space
To remove a shared memory object
Question 42 of 60
Quiz ID: q42
In message passing with bounded capacity, what happens when the link is full?
The oldest message is overwritten
The sender receives an error code
The sender blocks until space is available
The message is temporarily stored in swap space
Question 43 of 60
Quiz ID: q43
What is the main advantage of using multi-threaded processes over multiple single-threaded processes?
Threads provide better security isolation
Threads within a process can share resources more efficiently
Threads are easier to program and debug
Threads have independent memory protection
Question 44 of 60
Quiz ID: q44
In the Windows API, what is the purpose of the WaitForSingleObject() function in process management?
To wait for a process to be created
To wait for a process to terminate
To wait for a mutex to be released
To wait for an I/O operation to complete
Question 45 of 60
Quiz ID: q45
What is the role of the matchmaker in RPC systems?
To encrypt communication between client and server
To balance load across multiple servers
To connect clients with appropriate server ports
To authenticate users before allowing remote calls
Question 46 of 60
Quiz ID: q46
In the process creation sequence using fork() and exec(), what is unique about the child process immediately after fork()?
It has a different program counter than the parent
It is an exact duplicate of the parent process
It has no access to parent's open files
It runs with higher priority than the parent
Question 47 of 60
Quiz ID: q47
What is the main purpose of the 'sandbox' in Chrome's renderer processes?
To provide a testing environment for web developers
To restrict disk and network I/O for security
To isolate JavaScript execution from HTML rendering
To manage memory allocation for web content
Question 48 of 60
Quiz ID: q48
In direct communication, what is a limitation of the communication link?
It can only be used for unidirectional communication
It is associated with exactly one pair of communicating processes
It has a fixed maximum message size
It requires a parent-child relationship between processes
Question 49 of 60
Quiz ID: q49
What is the significance of the program counter in process context?
It determines the process's priority level
It indicates the next instruction to execute when the process resumes
It tracks the amount of CPU time used by the process
It stores the process's memory allocation boundaries
Question 50 of 60
Quiz ID: q50
In the producer-consumer problem with message passing, what synchronization is required?
Explicit synchronization using semaphores or mutexes
Synchronization is handled automatically by the message queue
The producer and consumer must coordinate their execution times
The operating system must mediate all message exchanges
Question 51 of 60
Quiz ID: q51
What is the purpose of the shm_unlink() function in POSIX shared memory?
To unmap shared memory from a process's address space
To remove a shared memory object
To decrease the size of a shared memory object
To synchronize access to shared memory
Question 52 of 60
Quiz ID: q52
In process termination, what is the difference between exit() and abort()?
exit() terminates gracefully while abort() terminates immediately
exit() can only be called by the parent process
abort() allows resource cleanup while exit() does not
exit() works only for child processes
Question 53 of 60
Quiz ID: q53
What is the main advantage of using message passing over shared memory for IPC?
Message passing is generally faster
Message passing avoids synchronization issues
Message passing uses less memory
Message passing works better for large data transfers
Question 54 of 60
Quiz ID: q54
In the Windows LPC mechanism, what is the purpose of the shared section object?
To establish the initial connection
To transfer large messages (>256 bytes) efficiently
To provide security authentication
To manage port allocation
Question 55 of 60
Quiz ID: q55
What is the role of the kernel port in Mach task creation?
To handle all system calls for the task
To manage memory allocation for the task
To provide communication with the kernel
To schedule the task's threads
Question 56 of 60
Quiz ID: q56
In the context of process scheduling, what is the main goal of process scheduling?
To maximize CPU utilization while providing reasonable response time
To minimize memory usage across all processes
To ensure all processes get exactly equal CPU time
To prioritize system processes over user processes
Question 57 of 60
Quiz ID: q57
What is the purpose of the time_slice field in Linux's task_struct?
To track the total CPU time used by the process
To determine how long the process can run before being preempted
To record when the process was last scheduled
To set the process's priority level
Question 58 of 60
Quiz ID: q58
In the Chrome multiprocess architecture, what is the role of the browser process?
To render web pages and execute JavaScript
To manage plugins and extensions
To manage the user interface, disk, and network I/O
To provide a sandboxed environment for web content
Question 59 of 60
Quiz ID: q59
What is the significance of the 'counter' variable in the producer-consumer problem with full buffer utilization?
It tracks the number of items in the buffer
It determines the producer's execution speed
It synchronizes access to the buffer
It prevents buffer overflow
Question 60 of 60
Quiz ID: q60
In RPC, what is the purpose of marshalling parameters?
To encrypt parameters for secure transmission
To compress parameters to reduce network traffic
To convert parameters into a standard format for transmission
To validate parameters before remote execution
Quiz Summary
Review your answers before submitting
60
Total Questions
0
Answered
60
Remaining
00:00
Time Spent
Submit Quiz
Back to Questions
Previous
Question 1 of 60
Next
!
Confirm Submission
Cancel
Submit Quiz