Match the following for UNIX system calls : \(\begin{array}{clcl}…

2015

Match the following for UNIX system calls :

\(\begin{array}{clcl} &\textbf{List-I} && \textbf{List-II} \\ \text{(a)} & \text{exec} & \text{(i)} & \text{Creates new process} \\ \text{(b)} & \text{brk} & \text{(ii)} & \text{Invokes another program overlaying memory} \\&&& \text{space with a copy of an executable file.}\\ \text{(c)} & \text{wait} & \text{(iii)} & \text{To increase or decrease the size of data region} \\ \text{(d)} & \text{fork} & \text{(iv)} & \text{A process synchronizes with termination of} \\ &&&\text{child process}\\ \end{array}\)

Codes :

  1. A.

    (a)-(ii), (b)-(iii), (c)-(iv), (d)-(i)

  2. B.

    (a)-(iii), (b)-(ii), (c)-(iv), (d)-(i)

  3. C.

    (a)-(iv), (b)-(iii), (c)-(ii), (d)-(i)

  4. D.

    (a)-(iv), (b)-(iii), (c)-(i), (d)-(ii)

Attempted by 203 students.

Show answer & explanation

Correct answer: A

Correct matching:

  • (a) exec → Invokes another program overlaying memory with a copy of an executable file.

  • (b) brk → To increase or decrease the size of the data region.

  • (c) wait → A process synchronizes with termination of a child process.

  • (d) fork → Creates new process.

Short explanations:

  • exec: Replaces the current process image with a new executable; the running program is overlaid by the specified executable.

  • brk: Adjusts the program break to increase or decrease the size of the data segment (heap) for dynamic memory.

  • wait: Causes a parent process to suspend execution until one of its child processes terminates; it can then obtain the child's exit status.

  • fork: Creates a new process by duplicating the calling process; after fork both parent and child continue execution.

Explore the full course: Mppsc Assistant Professor