Question 56
Which of the following is shared among threads of the same process?
Threads of the same process share code section, data section, and OS resources (like open files), but maintain private stack, registers, and PC.
Which of the following is shared among threads of the same process?
Threads of the same process share code section, data section, and OS resources (like open files), but maintain private stack, registers, and PC.
A situation where multiple processes access and manipulate shared data concurrently and outcome depends on execution order is -
A race condition occurs when concurrent thread access to shared data leads to unpredictable results depending on execution timing.
Which section of code accesses shared variables and requires synchronization?
The critical section is the code segment where a process accesses shared resources (memory, variables, files) that must not be accessed concurrently.
In Unix, PID 1 is traditionally assigned to which process?
PID 1 belongs to init (or systemd), the ancestor of all system processes started directly by the Linux kernel at boot.
Context switching is performed by -
Context switching is a core OS kernel mechanism that saves state of current running process and restores state of newly scheduled process.