Match the following WINDOWS system calls and UNIX system calls with reference…

2017

Match the following WINDOWS system calls and UNIX system calls with reference to process control and File manipulation.

\(\begin{array}{llll} & \textbf{Windows} & & \textbf{UNIX} \\ (a) & \text{Create – process ( )} & (i) & \text{Open ( )} \\ (b) & \text{WaitForSingleObject ( )} & (ii) & \text{Close ( )} \\ (c) & \text{CreateFile ( )} & (iii) & \text{Fork ( )} \\ (d) & \text{CloseHandle ( )} & (iv) & \text{Wait ( )} \end{array}\)

Code :

  1. A.

    (𝑎)−(𝑖𝑖𝑖)(𝑏)−(𝑖𝑣)(𝑐)−(𝑖)𝑑−(𝑖𝑖)

  2. B.

    (𝑎)−(𝑖𝑣)(𝑏)−(𝑖𝑖𝑖)(𝑐)−(𝑖)𝑑−(𝑖𝑖)

  3. C.

    (𝑎)−(𝑖𝑣)(𝑏)−(𝑖𝑖𝑖)(𝑐)−(𝑖𝑖)𝑑−(𝑖)

  4. D.

    (𝑎)−(𝑖𝑖𝑖)(𝑏)−(𝑖𝑣)(𝑐)−(𝑖𝑖)𝑑−(𝑖)

Attempted by 206 students.

Show answer & explanation

Correct answer: A

Answer: Create – process → Fork; WaitForSingleObject → Wait; CreateFile → Open; CloseHandle → Close.

  • Create – process (Windows) corresponds to Fork (UNIX).

    Reason: Windows CreateProcess (or Create for a process) spawns a new process; UNIX fork creates a new process by duplicating the calling process.

  • WaitForSingleObject (Windows) corresponds to Wait (UNIX).

    Reason: Both calls block until a specified process or child process finishes or a particular object/state is signaled.

  • CreateFile (Windows) corresponds to Open (UNIX).

    Reason: Both obtain a handle or file descriptor to access a file for reading/writing.

  • CloseHandle (Windows) corresponds to Close (UNIX).

    Reason: Both release the handle or file descriptor and free associated resources.

Explore the full course: Mppsc Assistant Professor