tailieunhanh - Operating-System concept 7th edition phần 4

số lượng đăng ký có sẵn, và các yếu tố khác. Cũng có thể có thói quen để phân bổ các máy in, modem, ổ đĩa lưu trữ USB, và các thiết bị ngoại vi khác. Kế toán. Chúng tôi muốn theo dõi trong đó người dùng sử dụng bao nhiêu và những loại tài nguyên máy tính. Lưu trữ hồ sơ này có thể được sử dụng cho kế toán | Atomic Transactions 229 before the transaction T starts execution. If a transaction 7 has been assigned timestamp TS T and later a new transaction 7 enters the system then TS T TS T . There are two simple methods for implementing this scheme Use the value of the system clock as the timestamp that is a transaction s timestamp is equal to the value of the clock when the transaction enters the system. This method will not work for transactions that occur on separate systems or for processors that do not share a clock. Use a logical counter as the timestamp that is a transaction s timestamp is equal to the value of the counter when the transaction enters the system. The counter is incremented after a new timestamp is assigned. The timestamps of the transactions determine the serializability order. Thus if TS T TS T then the system must ensure that the produced schedule is equivalent to a serial schedule in which transaction T appears before transaction Tj. To implement this scheme we associate with each data item Q two timestamp values W-timestamp Q denotes the largest timestamp of any transaction that successfully executed write Q . R-timestamp Q denotes the largest timestamp of any transaction that successfully executed read Q . These timestamps are updated whenever a new read Q or write Q instruction is executed. The timestamp-ordering protocol ensures that any conflicting read and write operations are executed in timestamp order. This protocol operates as follows Suppose that transaction T issues read Q o IfTS T W-timestamp then T needs to read a value of Q that was already overwritten. Hence the read operation is rejected and Ti is rolled back. o IfTS 7 _ W-fimestamp Q then the read operation is executed and R-timestamp Q is set to the maximum of R-timestamp Q and TS Ĩ . Suppose that transaction issues write Q o If TS T R-timestamp Q then the value of Q that 7 is producing was needed previously and T assumed that this value would never be produced. Hence the .

TỪ KHÓA LIÊN QUAN