Question:
In an operating system, what is the purpose of the
fork() system call in Unix-like environments?
यूनिक्स जैसे वातावरण में
fork() सिस्टम कॉल का उद्देश्य क्या है?
Options:
- To create a new child process that is an exact duplicate of the calling parent process
- To execute a completely new binary executable in the current process space
- To terminate the current process immediately
- To allocate shared memory between two independent processes
- एक नई चाइल्ड प्रक्रिया बनाना जो कॉलिंग पैरेंट प्रक्रिया की हूबहू प्रतिलिपि हो
- वर्तमान प्रक्रिया स्पेस में एक नया बाइनरी निष्पादित करना
- वर्तमान प्रक्रिया को तुरंत समाप्त करना
- दो प्रक्रियाओं के बीच साझा मेमोरी आवंटित करना
Correct Answer: a)
Explanation:
The
fork() system call creates a new process (child) by duplicating the calling process (parent), returning 0 to the child process and the child’s PID to the parent process.
fork() कॉलिंग प्रक्रिया (पैरेंट) की प्रतिलिपि बनाकर एक नई चाइल्ड प्रक्रिया बनाता है। चाइल्ड में यह 0 और पैरेंट में चाइल्ड की PID लौटाता है।