ff1ecfd5d01

2
C H A P T E R 1 5 Transactions Solutions to Practice Exercises 15.1 Eve n in thi s case the re cov ery man age r is nee ded to per form rol l-b ack of abo rte d transactions. 15.2 There are several steps in the creati on of a le. A storage area is assigned to the le in the le system, a uni que i-number is given to the le and a n i-node entry is inserted into the i-list. Deletion of le involves exactly opposite steps. For the le system user in UNIX, durability is important for obvious rea- sons, but atomicity is not relevant generally as the le system doesn’t support transactions. To the le system implementor though, many of the internal le system actions need to have transaction semantics. All the steps involved in creation/deletion of the le must be atomic, otherwise there will be unrefer- enceable les or unusable areas in the le system. 15.3 Dat aba se sys tems usu all y per for m cru cia l tasks who se ef fec ts nee d to be atomic and dur abl e, and whose out come af fec ts the re al wor ld in a per manentmanner. Examples of such tasks are monetary transactions, seat bookings etc. Hence the ACID properties have to be ensured. In contrast, most users of le systems would not be willing to pay the price (monetary, disk space, time) of support- ing ACID properties. 15.4 If a transaction is very long or when it fetches data from a slow disk, it takes a long time to complete. In absence of concurrency, other transactions will have to wait for longer period of time. Average responce time will increase. Also whe n the tra nsa ction is reading dat a fro m dis k, CPU is idle . So re sour ce s ar e not properly utilized. Hence concurrent execution becomes important in this case. However, when the transactions are short or the data is available in memory, these problems do not occur. 75

Upload: nawal-bhageria

Post on 09-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

8/8/2019 FF1ECFD5d01

http://slidepdf.com/reader/full/ff1ecfd5d01 1/2

8/8/2019 FF1ECFD5d01

http://slidepdf.com/reader/full/ff1ecfd5d01 2/2