MDAT  1.0
 All Classes Files Functions Variables Typedefs Pages
Implementing Search-Insert-Delete with MDAT

In this synchronization problem, imagine a database with three types of accesses: search (read the database), insert (insert a record to the database), and delete (remove a record to the database). There are several concurrency rules that must be followed:

  • Search operations can access the database concurrently with other search operations.
  • Search operations can access the database concurrently with an insert operation.
  • Only one insert operation can access the database at a time (it is an error if two insert operations are concurrently accessing the database). As noted in the previous rule, the insert operation can run concurrently with any number of search operations.
  • Delete operations must have exclusive access to the database (no other search, insert, or delete operations can run concurrently).

The implementation is identical to that of the readers-writers problem except for the following differences:

  • The threads are divided into three types based on the access: search, insert, and delete. An enumerated type is used to distinguish between the types.
  • The checker is altered to reflect the mutual exclusion rules.
This is a personal WEB site developed and maintained by an individual and not by Seattle University. The content and link(s) provided on this site do not represent or reflect the view(s) of Seattle University. The individual who authored this site is solely responsible for the site's content. This site and its author are subject to applicable University policies including the Computer Acceptable Use Policy (www.seattleu.edu/policies).