Match the following Windows API calls with their functionally corresponding…

2021

Match the following Windows API calls with their functionally corresponding UNIX system calls for process control and file manipulation. List I (Windows): A. CreateProcess; B. WaitForSingleObject; C. CreateFile; D. CloseHandle. List II (UNIX): 1. open; 2. close; 3. fork; 4. wait. Select the correct code.

Answer: A. A-3, B-4, C-1, D-2CONCEPTSystem-call interfaces expose operating-system services such as creating processes, waiting for process completion, opening files, and releasing file…

  1. A.

    A-3, B-4, C-1, D-2

  2. B.

    A-4, B-3, C-1, D-2

  3. C.

    A-4, B-3, C-2, D-1

  4. D.

    A-3, B-4, C-2, D-1

Attempted by 1 students.

Show answer & explanation

Correct answer: A

CONCEPT

System-call interfaces expose operating-system services such as creating processes, waiting for process completion, opening files, and releasing file handles.

Calls from different operating-system families are matched by the service they perform, not by the similarity of their names.

APPLICATION

  1. Process creation: Windows CreateProcess starts a new process; the corresponding UNIX call is fork. Therefore A maps to 3.

  2. Process waiting: Windows WaitForSingleObject can wait for a process handle; the corresponding UNIX process-waiting call is wait. Therefore B maps to 4.

  3. File opening: Windows CreateFile opens or creates a file object; the corresponding UNIX call is open. Therefore C maps to 1.

  4. Handle release: Windows CloseHandle releases an open object handle; the corresponding UNIX file-descriptor operation is close. Therefore D maps to 2.

CROSS-CHECK / CONTRAST

  • A-4, B-3, C-1, D-2 swaps the two process-control functions: process creation is paired with wait, while waiting is paired with fork.

  • A-4, B-3, C-2, D-1 swaps both the process-control pair and the file-manipulation pair.

  • A-3, B-4, C-2, D-1 preserves the process-control pair but swaps file opening with handle closing.

Thus the complete matching is A-3, B-4, C-1, D-2.

Explore the full course: Uppsc Computer Operator Grade B

Loading lesson…