The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Below are the steps you will be executing to do an insert.
Get number of records
curr record num <--- add one to number of records
new sempophore <-- new Semophore for curr record num
acquire lock
insert record to physical table
release lock
The operations starting from "creating rec number" through "write" need to be synchronized without giving chance to dead locks.
Originally posted by jiju ka:
So in what mode you will add new room. Standalone mode is most appropriate. It you do it in network mode, it will not be easy to attain concurrency.
Further adding a new room is not a "must".
Concurrency for these ops is attained by synchronising (small code sections) on the data instance.
SCJP<br />SCJD (B&S in progress)
SCJP<br />SCJD (B&S in progress)
Consider Paul's rocket mass heater. |