Computer AwarenessVery hardIBPS SO IT Officer
A program calls fork() three times in a row, with no conditions, and every call succeeds. How many processes exist in total, counting the original?
- A. 8
- B. 6
- C. 4
- D. 7
Correct answer: A. 8
Each fork doubles the running processes: 1 → 2 → 4 → 8. Seven of them are children; 6 comes from wrongly adding 2 per call.
हिंदी में
एक प्रोग्राम बिना किसी शर्त के लगातार तीन बार fork() कॉल करता है, और प्रत्येक कॉल सफल होती है। मूल प्रक्रिया सहित कुल कितनी प्रक्रियाएँ होंगी?
- A. 8
- B. 6
- C. 4
- D. 7
उत्तर: A. प्रत्येक fork चल रही प्रक्रियाओं को दोगुना करता है: 1 → 2 → 4 → 8। इनमें से सात चाइल्ड हैं; 6 गलती से प्रति कॉल 2 जोड़ने से आता है।
More Computer Awareness questions
- A user program divides an integer by zero. What does the processor generate?
- Why do processors provide separate user mode and kernel (supervisor) mode?
- Which scheduler swaps partly executed processes out of memory to the disk, and later back in, to adjust the degree of multiprogramming?
- Defragmenting a hard disk drive usually speeds up file access because it:
- Match the OSI layer with the name of its data unit: 1. Transport 2. Network 3. Data link 4. Physical; a. Frame b. Bits c. Segment d. Packet
- The four-layer TCP/IP model has a single Application layer. Which OSI layers does it combine?