All mock tests are FREE till 31 December — register to save your progress

Match the following WINDOWS system calls with the equivalent UNIX system calls, with reference to process control and file manipulation:
Windows: (A) CreateProcess() (B) WaitForSingleObject() (C) CreateFile() (D) CloseHandle()
UNIX: (I) open() (II) close() (III) fork() (IV) wait()

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: A. A-III, B-IV, C-I, D-II

Explanation

CreateProcess() creates a new Windows process, the direct equivalent of UNIX's fork() (A-III). WaitForSingleObject() blocks the caller until a handle such as a child process signals completion, matching UNIX's wait() (B-IV). CreateFile() opens or creates a file handle in Windows, equivalent to UNIX's open() (C-I), and CloseHandle() releases a Windows handle just as close() releases a UNIX file descriptor (D-II). This gives A-III, B-IV, C-I, D-II, which is option (i).

More Software Engineering questions