Referencing Styles : Open
List three thread models used for mapping user threads to kernel threads and provide one advantage for each model (9 points) 2. What is the meaning of the term busy waiting? Can busy waiting be avoided altogether? Explain your answer.(5 points) 3. Why do Solaris, Linux, and Windows 2000 use spinlocks as a synchronization mechanism only on multiprocessor systems and not on single processor systems?(6 points) 4. How does the signal ( ) operation associated with monitors differ from the corresponding operation defined for semaphores?(10 points) 5. A file is to be shared among different processes, each of which has a unique number. The file can be accessed simultaneously by several processes, subject to the following constraint: The sum of all unique numbers associated with all the processes currently accessing the file must be less than n. Using pseudocode, write a monitor to coordinate access to the file.(15 points) 6. There are three cooperating processes. They all read data from the same input device. Each process, when it gets the input device, must read two consecutive data. (Hint: use mutual exclusion to achieve it). Use semaphores to synchronize. Include declaration and initialization. (30 points) P1: input(a1,a2) P2: input (b1,b2) P3: input(c1,c2) Y=a1+c1 W=b2+c2 Z=a2+b1 Print (X) X=Z-Y+W Use the minimum number of semaphores.
-
- Assignment status: Resolved by our Writing Team
- Source@PrimeWritersBay.com
Comments
Post a Comment