← Indietro
EsameEsame completoTesto d’esame

17 01 20

Esame completo di Data Bases 2 per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Data Bases 2Esame completo

Informazioni sul documento

Cosa trovi in questo materiale

Esame completo di Data Bases 2 per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Qualità dell’importazione: il testo è stato estratto direttamente dal documento originale.

Contenuti estratti dal documento

Passaggi rappresentativi riconosciuti nelle diverse parti del materiale. Il testo completo resta presente nella pagina per la ricerca, mentre l’anteprima compatta rende più semplice la lettura.

Pagina 1

DATA BASES 2 – JANUARY 17TH, 2020 – DURATION: 2H PROF. SARA COMAI, PROF. DANIELE M. BRAGA A. Active Databases (9 p.) RESOURCE (ResourceID, ReadLocked, Counter, WriteLocked) // Free resources are not stored REQUEST (TransactionID, NumberOfOperation, ResourceID, Operation) // Operation=ReadLock|WriteLock|Unlock WAITINGTRANSACTIONS (TransactionID, ResourceID, Timestamp) The tables described above are used to manage locks in a transactional system; for each resource in use, the system stores all the received r-lock/w-lock/unlock requests, and accordingly updates its usage status in table RESOURCE. Depending on the lock status of the resources, the system may grant or deny the lock, or insert the transaction in a waiting queue (where a timestamp is used to represent the waiting order, with higher timestamp s given to transactions being enqueued later). When a waiting transaction reaches a situation such that it can obtain the requested lock, it is removed from the queue. Write a set of triggers that – among all the events and actions that may occur – manage these two specific cases: a) read- lock requests received for a write-locked resource; b) unlock requests received for a write-locked resource. The t riggers shall handle the evolution of the status of the resources and also maintain the queue of waiting transactions. As an example, consider the following situation: X is initially w-locked by T1, and the lock manager receives the requests: read-lock2(X), read-lock3(X), unlock1(X)  after the unlock, X will be r-locked by T2 and T3, and the queue will be empty. B Concurrency Control (7 p.) Classify this schedule w.r.t. VSR, CSR, 2PL, 2PL-strict, TS-mono, TS-multi, giving terse but precise justifications: r1(X) r2(Y) w2(X) r1(Y) r3(X) r3(Y) r1(Z) w3(X) w2(Z) C. XML (8 p.)…

Anteprima

Prima pagina del documento.

Prima pagina: 17 01 20