Match the following WINDOWS system calls and UNIX system calls with reference to process control and File manipulation. Windows UNIX A. Create-process( ) I. Open( ) B. WaitForSingleObject( ) II. Close( ) C. CreateFile( ) III. Fork( ) D. CloseHandle( ) IV. Wait( )
A - III, B - IV, C - I, D - II
Operating systems provide system calls to allow user programs to interact with the system's resources, such as creating processes, managing files, and handling input/output. While different operating systems like Windows and UNIX (and its variants like Linux) have their own unique sets of system calls, many fundamental operations have equivalent functions across systems, though the names and exact behaviors may differ.
This question asks us to match common Windows system calls related to process control and file manipulation with their closest equivalents in the UNIX system.
Let's look at the purpose of each system call listed:
Based on the functionalities described, we can find the closest matches:
| Windows System Call | Functionality | UNIX System Call | Functionality | Match |
|---|---|---|---|---|
| CreateProcess() | Create a new process | fork() | Create a child process (duplicate of parent) | A - III |
| WaitForSingleObject() (with process handle) | Wait for a process to terminate | wait() | Wait for a child process to terminate | B - IV |
| CreateFile() | Open or create a file/device | open() | Open or create a file/device | C - I |
| CloseHandle() (with file/process handle) | Close an object handle | close() | Close a file descriptor | D - II |
Let's confirm the matches:
The correct mapping is A - III, B - IV, C - I, D - II.
| Windows System Call | UNIX System Call Equivalent | Category |
|---|---|---|
| CreateProcess() | fork() | Process Control (Creation) |
| WaitForSingleObject() | wait() | Process Control (Synchronization/Waiting) |
| CreateFile() | open() | File Manipulation (Opening/Creation) |
| CloseHandle() | close() | File Manipulation (Closing) |
System calls form the interface between a process and the operating system. They provide a controlled way for user-level programs to request services from the kernel, such as managing processes, accessing hardware, and handling files.
Understanding the equivalence of system calls across different operating systems is important for programmers working in heterogeneous environments or studying operating system concepts.
A mechanism for arranging controlled access to a shared resource, like a file, is called:
Which UNIX/Linux command is used to make all files and sub-directories in the directory “progs” executable by all users?
In Linux operating system environment ________ command is used to print a file.
Consider the following statements :
(a) UNIX provides three types of permissions
Read
Write
Execute
(b) UNIX provides three sets of permissions
permission for owner
permission for group
permission for others
Which of the above statement/s is/are true ?
File manipulation operations in an operating system include: