โ† Back to 18. The Linux System

๐Ÿ“ The fork() and exec() process model

๐Ÿ“– From Operating System โ€ข 18. The Linux System โ€ข 36 questions available

Practice MCQs for The fork() and exec() process model. Test your knowledge with carefully crafted questions across easy, medium, and hard difficulty levels.

๐Ÿ”„ Last updated: 2026-07-27

8
Easy Questions
17
Medium Questions
11
Hard Questions

๐Ÿ“ Sample Questions

Q1. What is the primary purpose of the fork() system call in a UNIXโ€‘like operating system?

๐Ÿ”น A. It creates a new process that is a copy of the calling process
๐Ÿ”น B. It replaces the current process image with a new program
๐Ÿ”น C. It terminates the calling process and returns its exit status
๐Ÿ”น D. It changes the effective user ID of the process

๐Ÿ’ก Difficulty: easy | โœ… Correct: A

Q2. Why does UNIX separate process creation (fork) from program execution (exec) into two distinct system calls?

๐Ÿ”น A. Because it allows a program to create a child and then modify the childโ€™s environment before loading a new program
๐Ÿ”น B. Because it simplifies the kernel by avoiding the need to load binaries directly
๐Ÿ”น C. Because it reduces the number of system calls required to start a new program
๐Ÿ”น D. Because it enforces security by preventing a parent from directly executing code in its address space

๐Ÿ’ก Difficulty: medium | โœ… Correct: C

Q3. How does the address space of a child process immediately after a successful fork() compare to that of the parent before any exec()?

๐Ÿ”น A. It is an exact copy, but the kernel uses copyโ€‘onโ€‘write so pages are shared until written
๐Ÿ”น B. It is a completely new empty address space
๐Ÿ”น C. It contains only the kernelโ€™s code and no userโ€‘level data
๐Ÿ”น D. It is identical, but the child receives a separate set of physical memory pages right away

๐Ÿ’ก Difficulty: hard | โœ… Correct: B

โฌ†๏ธ View all questions in the quiz below

๐Ÿ”— Related Topics

๐Ÿ“ Linux History๐Ÿ“ The Linux kernel๐Ÿ“ The Linux system๐Ÿ“ Linux distributions๐Ÿ“ Linux licensing
๐Ÿš€ Start Quiz ๐Ÿ“ Practice Mode