[Solved] Exercise 3 Consider M Updater Processes N Browser Processes Concurrently Accessing Databas Q37248977

Exercise 3 Consider m updater processes and n browser processes concurrently accessing a database in a multiprogrammed operating system, using the pseudocode in the figure below. int count0 semaphore s.db(1) semaphore s.count(1) shared void browser void updater P(s.db) /update db V(s.db) P(s.count) count++ f (count-1) P(s.db) V(s.count, /browse db P(s.count) count- if (count-0) V(s.db) V(s.count) Briefly discuss the following questions about the solution above (do not just answer “yes” or “no”) 1. If an updater is updating, in what semaphore(s) do browser processes block? 2. If a browser is browsing, can other browsers be prevented from browsing? 3. How many updater processes can concurrently update the database? 4. Does the same browser process which executes P(s.db) also execute V(s.db)? 5. Is the solution given free of deadlock and starvation? 6. What would happen if the only semaphore were s.db? (that is, if we would delete all lines related to s.count in the pseudocode) Show transcribed image text Exercise 3 Consider m updater processes and n browser processes concurrently accessing a database in a multiprogrammed operating system, using the pseudocode in the figure below. int count0 semaphore s.db(1) semaphore s.count(1) shared void browser void updater P(s.db) /update db V(s.db) P(s.count) count++ f (count-1) P(s.db) V(s.count, /browse db P(s.count) count- if (count-0) V(s.db) V(s.count) Briefly discuss the following questions about the solution above (do not just answer “yes” or “no”) 1. If an updater is updating, in what semaphore(s) do browser processes block? 2. If a browser is browsing, can other browsers be prevented from browsing? 3. How many updater processes can concurrently update the database? 4. Does the same browser process which executes P(s.db) also execute V(s.db)? 5. Is the solution given free of deadlock and starvation? 6. What would happen if the only semaphore were s.db? (that is, if we would delete all lines related to s.count in the pseudocode)
Expert Answer
Answer to Exercise 3 Consider m updater processes and n browser processes concurrently accessing a database in a multiprogrammed o… . . .
OR

