Model Question Paper - KTU BTech PCCST403 OS Operating System 2024 Scheme - Answer Key
PART A 1.On a Linux-based system, a process holding an array of 1 million integers executes fork() . The child process only reads the array to compute a sum, while the parent continues modifying the array. If the parent modifies 10% of the pages and the array spans 2000 pages : How many physical copies of the array exist immediately after fork() ? How many pages get duplicated due to the modifications? ✅ Answer Key Concepts Involved fork() in Linux uses Copy-On-Write (COW) Initially, parent and child share the same physical pages A page is copied only when one process modifies it Step-by-Step Reasoning 1. Immediately after fork() No pages are copied yet Parent and child share all 2000 pages So: 👉 Physical copies of the array = 1 (shared) 2. When the parent modifies 10% of pages Total pag...