Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(a) Consider that two processes, P1 and P2, are executing concurrently. Both the processes share a standard variable named Counter, having an initial value =5.
(a) Consider that two processes, P1 and P2, are executing concurrently. Both the processes share a standard variable named "Counter", having an initial value =5. Find the final value of Counter and update tables below: - Process P1 tries to increment the value of the counter. - Process P2 tries to decrement the value of the counter. - Update column Reg 1, Counter and Reg 2 . ii. The execution order of the instructions may be P1, P1 without updating the counter value, P2, P2 without updating the counter value, P1, P2 . [7] (Notes: Column P1 with value 1 is produce 1 slot and column P2 with value 1 is consume 1 slot) b) There are 2 concurrent processes wishing to enter their Critical Sections (CSi). Using Paterson's algorithm complete table below: [8] a) A paging system with 512 pages of logical address space, a page size of 28 and number of frames is 1024 . Answer the following questions (in bytes or in form 2n ) and show all your work. i. What is the total size of the logical address space? [2] ii. What is the total size of the physical address space? [2] iii. What is the frame size of the physical memory? [1] iv. How many frames of the physical memory in a number of the form 2t ? [1] v. How many number of entry in the page table? [1] vi. What is the number of bit for the page number in logical memory address and frame number in physical memory address? [2] vii. What is the logical address (in decimal) given a physical address of 1010000100102. [2] b) There are 4 jobs (in order) of A(100KB),B(350KB),C(450KB) and D(220KB) need to be placed in the memory. Assume a fixed partition is used with six memory partitions of 200KB,300KB,125KB,600KB,450KB and 250KB (in order). i. Use the Next-fit algorithm to indicate which memory blocks are allocated to each of the four arriving jobs. Draw the memory stack and label the partition size clearly (shaded for unused). [4] ii. Does internal fragmentation occur? State the internal fragmentation total? [2]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started