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
History
chevron_right
Industrialization
chevron_right
Ancient Civilizations
chevron_right
Medieval World History
chevron_right
Revolution and Counter-Revolution
Chemistry
chevron_right
Matter and Measurements
chevron_right
States of Matter and Solutions
chevron_right
Electronic Structure and Periodicity
chevron_right
Chemical Bonding
Physics
chevron_right
Waves and Optics
chevron_right
Thermodynamics
chevron_right
Electricity and Magnetism
chevron_right
Geometrical Optics
Computer Science
chevron_right
Programming in C
chevron_right
Python Programming Language
chevron_right
Computer Networks
chevron_right
Analysis and Design of Algorithms