Reference no: EM132085620
One of the most important properties of database transaction management is consistency.
Synchronization of the reads and writes of data is a crucial step in achieving consistency. In this lab, please use SimPy to simulate database transaction reading and writing.
Your project should randomly generate read and write events that will read or write a set of data for a period of time.
The simulation times, number of data blocks, and longest read or write time period are set at the beginning of the simulation.
The simulation time needs to be at least 2xnumber of data blocks x longest read or write time Strategy 1: typically reader and writer: This is the typical strategy where there are multiple readers and a single writer Read Request: if there is no write lock on the data, then grant read lock for the period of time requested.
If there is a write lock, then wait till the read lock is free and it is the reader's turn. Write Request: if there is no write lock on the data, then grant write lock for the period of time requested.
If there is a write lock, then wait till the write lock is free and it is the writers' turn. Lab A: Utilizing this strategy there is still a chance for starvation.
Please suggest and implement a solution that would avoid starvation. Strategy 2: invalid dirty write This approach assumes that the likelihood of write conflict is rare.
Thus, locks to read or write are not acquired, but rather the timestamp of the last read/write is used.
If the time stamp of the last read/write is after the start of the current write, the write is invalidated and the write transaction is reattempted.
Lab B: please implement this strategy and run the simulation to see how many data blocks do you need to reduce the average percent (at least 10 runs) write invalid events to below 5% * If you are working on this project by yourself, you may choose either part A or B. SimPY is a simulation package that you can install after you have setup your Python environments.
Anaconda is a simple Python package with most of the libraries and packages installed. SimPY can be installed via "pip install simpy" after conda install.
Examples of interests includes: Resources: Store (Event Latency and Process Communication) and Shared events: Move Renege.
Deign a synchronization solution using only locks
: Deign a synchronization solution using only locks, semaphores and integer variables that achieve.
|
Develop a crud matrix develop a crud matrix
: Identify Create, Update, and Delete Privileges For each piece of information, first identify who has create, update, and delete privileges.
|
Calculate the net present value and profitability index
: BAK Corp. is considering purchasing one of two new diagnostic machines. Calculate the net present value and profitability index of each machine
|
Expalin variables in java must have a declared type
: For each one of the following statements about Java, indicate whether or not it is also true for Smalltalk.
|
Discuss about the database transaction management
: The simulation times, number of data blocks, and longest read or write time period are set at the beginning of the simulation.
|
Organizational culture characteristics make project
: A variety of organizational culture characteristics make project success more likely.
|
Calculate the net present value
: Caine Bottling Corporation is considering the purchase of a new bottling machine. Calculate the net present value
|
Progress of the do stage your improvement project
: Discuss the progress of the Do Stage your improvement project,
|
Defense-related companies as the business market
: Then give an example of each difference using college students as the consumer market and defense-related companies as the business market.
|