[SOLVED] COE18-Lab 7

24.99 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (2 votes)
  1. Simulate the Producer Consumer code discussed in the class.
  2. Extend the producer consumer simulation in Q1 to sync access of critical data using Petersons algorithm.
  3. Dictionary Problem: Let the producer set up a dictionary of at least 20 words with three attributes (Word, Primary meaning, Secondary meaning) and let the consumer search for the word and retrieve its respective primary and secondary meaning.

Note: This can be implemented using either Mutex locks or Petersons algorithm.

 

Non-Mandatory (Extra credits):

  1. Extend Q3 to avoid duplication of dictionary entries and implement an efficient binary search on the consumer side in a multithreaded fashion.
  2. Trace and understand the working of synchronization algorithms like Dijkstra, Dekker’s algorithm
Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.