Match List I with List II List I List II System calls Description A. fork() I. Sends a signal from one process to another process B. exec() II. Indicates termination of the current process C. kill() III. Loads the specified program in the memory D. exit() IV. Creates a child process Choose the correct answer from the options given below :
A ‐ IV, B ‐ III, C ‐ I, D ‐ II
System calls are the interface between a user program and the operating system. They allow user programs to request services from the kernel, such as creating processes, managing memory, and performing I/O operations. This question asks us to match common process-related system calls with their functions.
Let's analyze each system call provided in List I and match it with the correct description from List II.
Based on this analysis, we can establish the following correct matches:
| System Call (List I) | Description (List II) |
|---|---|
| A. fork() | IV. Creates a child process |
| B. exec() | III. Loads the specified program in the memory |
| C. kill() | I. Sends a signal from one process to another process |
| D. exit() | II. Indicates termination of the current process |
This matching gives us the combination: A - IV, B - III, C - I, D - II.
Comparing our correct matching (A - IV, B - III, C - I, D - II) with the given options, we find that it matches one of the options precisely.
Thus, the correct option is the one listing A as IV, B as III, C as I, and D as II.
| System Call | Primary Function | Result |
|---|---|---|
| fork() | Process creation | Creates a new, identical child process |
| exec() | Process replacement | Replaces the current process image with a new program |
| kill() | Signal sending | Sends a signal to another process |
| exit() | Process termination | Causes the current process to terminate |
Process management is a core function of an operating system. It involves creating, scheduling, terminating, and coordinating processes. The system calls discussed above are fundamental to process management in Unix-like operating systems.
Understanding these basic system calls is crucial for comprehending how programs execute and interact within an operating system environment.
A computer system has 7 tape drives. There are ‘n’ processes competing for them. Each process may need 2 tape drives. What is the maximum value of ‘n’ for which the system is guaranteed to be deadlock free?
Identify the circumstances under which pre-emptive CPU scheduling is used:
(a) A process switches from Running state to Ready state
(b) A process switches from Waiting state to Ready state
(c) A process completes its execution
(d) A process switches from Ready to Waiting state
Choose the correct option:
Assuming that the system call fork () never fails, consider the following C programs P1 and P2 executed on a UNIX / Linux system:
/*P1*/ Int main() { fork (): fork () ; fork () ; Printf(“Happy\n”); } | /*P2*/ Int main() { fork (); Printf(“Happy\n”); fork () Printf(“Happy\n”); fork () ; Printf(“Happy\n”); } |
Statement I: P1 displays "Happy" 8 times.
Statement II: P2 displays "Happy" 12 times.
In the light of the above statements, choose the correct answer from the options given below
________ system call creates new process in Unix.
The processes that are residing in main memory and are ready and waiting to be executed, are kept on a list called