Ace
Learns
Theme
light_mode
dark_mode
light_mode
Light
dark_mode
Dark
monitor
Auto
Open main menu
menu_open
×
Home
History
Geography
Astronomy
Physics
Chemistry
Biology
Agriculture
Sports
Computer Science
Articles
Contact Us
MCQ Categories
Articles
Home
Contact Us
Home
»
Computer Science
»
Operating System
»
Process
Operating System
unfold_more
double_arrow
Deadlock in Operating System
double_arrow
Inter-Process Communication
double_arrow
Process
double_arrow
Process Schedulers
double_arrow
Synchronization in Operating System
double_arrow
Threads in Operating System
quiz
Process
1.
What is a process in an operating system?
A)
A program in execution
B)
A set of instructions
C)
Executable files
D)
A collection of hardware components
Answer
keyboard_arrow_down
keyboard_arrow_up
A) A program in execution
Explanation
2.
When a program is loaded into memory and becomes a process, what are the four sections into which it is divided?
A)
Text, data, heap, and stack
B)
Kernel, user space, virtual memory, and cache
C)
Input, processing, output, and storage
D)
Registers, cache, RAM, and disk
Answer
keyboard_arrow_down
keyboard_arrow_up
A) Text, data, heap, and stack
Explanation
3.
What are the possible states a process can be in an operating system?
A)
New, ready, running, blocked, terminated
B)
Active, inactive, suspended, completed
C)
Created, terminated, waiting, halted
D)
Sleep, ready, swapped, dead
Answer
keyboard_arrow_down
keyboard_arrow_up
A) New, ready, running, blocked, terminated
Explanation
4.
What does “spawning” refer to in the context of operating systems?
A)
Terminating a process
B)
Creating a new process
C)
Blocking a process
D)
Suspending a process
Answer
keyboard_arrow_down
keyboard_arrow_up
B) Creating a new process
Explanation
5.
Which of the following information is typically stored in the Process Control Block (PCB)?
A)
Process ID and parent process ID
B)
Program code and data
C)
CPU registers and program counter
D)
All of the above
Answer
keyboard_arrow_down
keyboard_arrow_up
D) All of the above
Explanation
6.
What is the process identifier of a null process in an operating system?
A)
0
B)
1
C)
Null
D)
-1
Answer
keyboard_arrow_down
keyboard_arrow_up
A) 0
Explanation
7.
How often does the fork system call execute in the following code snippet?
#include <stdio.h> #include <unistd.h> int main() { fork(); fork(); printf("Hello world\n"); return 0; }
A)
Once
B)
Twice
C)
Thrice
D)
Four times
Answer
keyboard_arrow_down
keyboard_arrow_up
D) Four times
Explanation
8.
What is the return value of the fork system call in both the parent and child processes?
A)
Parent process: -1, Child process: 0
B)
Parent process: 0, Child process: -1
C)
Parent process: -1, Child process: child's PID
D)
Parent process: child's PID, Child process: 0
Answer
keyboard_arrow_down
keyboard_arrow_up
D) Parent process: child's PID, Child process: 0
Explanation
Quick Links
Current Affairs & Events
chevron_right
Daily Current Affairs
chevron_right
Latest Current Events
Agriculture
chevron_right
Animal Husbandry
chevron_right
Mutations and Crop Improvement
chevron_right
Green Revolution
chevron_right
Major Crops and Classification
Astronomy
chevron_right
The Universe
chevron_right
Stars
chevron_right
Space Exploration
chevron_right
Galaxies
Physics
chevron_right
Electricity and Magnetism
chevron_right
Dynamics
chevron_right
Geometrical Optics
chevron_right
Waves and Optics