Presentation is loading. Please wait.

Presentation is loading. Please wait.

18 September 2008CIS 340 # 1 Last Covered (almost)(almost) Variety of middleware mechanisms Gain? Enable n-tier architectures while not necessarily using.

Similar presentations


Presentation on theme: "18 September 2008CIS 340 # 1 Last Covered (almost)(almost) Variety of middleware mechanisms Gain? Enable n-tier architectures while not necessarily using."— Presentation transcript:

1 18 September 2008CIS 340 # 1 Last Covered (almost)(almost) Variety of middleware mechanisms Gain? Enable n-tier architectures while not necessarily using a browser and all that accompanies a distributed structure

2 18 September 2008CIS 340 # 2 Can you answer? How are object-based MW different from message-based MW? How is a “monitor” different from a “broker” system?

3 18 September 2008CIS 340 # 3 Topics To understand ACID as defining database needs of an operating system To understand the operating system Basic responsibilities Standard enhancements Distributed processing support

4 18 September 2008CIS 340 # 4 ACIDS: ACID + Serializability The assurance governing concurrent execution Goal: Several transactions occurring yield consistent results ANSI standard specification: A transaction sequence continues from beginning to end -- through all succeeding SQL statements – until: –COMMIT statement is reached –ROLLBACK statement is reached –End of program is reached –Program is abnormally terminatedDef:

5 Data management (concept) Commit -making a set of tentative changes permanent Rollback - an operation which returns the database to some previous state. –Rollbacks are important for database integrity, because they mean that the database can be restored to a clean copy even after erroneous operations are performedintegrity Integrity –Entity integrity concerns the concept of a primary key. Entity integrity is an integrity rule which states that every table must have a primary key and that the column or columns chosen to be the primary key should be unique and not null.Entity integrityprimary key –Referential integrity concerns the concept of a foreign key. Referential integrityforeign key no child record can exist without a parent 18 September 2008CIS 340 # 5

6 18 September 2008CIS 340 # 6 Classic Problems for Shared DBs Data integrity and consistency problems –Lost updates –Uncommitted data –Inconsistent retrievals

7 18 September 2008CIS 340 # 7 Lost Updates Normal Execution: T1: PRO_QOH=PRO_QOH+100, T2: PRO_QOH=PRO_QOH-30 Problematic Execution

8 18 September 2008CIS 340 # 8 Uncommitted Data Correct Execution of Two Transactions T1: PRO_QOH=PRO_QOH+100 (Rollback), T2: PRO_QOH=PRO_QOH-30 Data Never Reached Commit, But Still Appears

9 18 September 2008CIS 340 # 9 Inconsistent Retrievals Valid Retrieval During Update: T2: correction of typing error 10 units Data Entry Correction

10 Inconsistent Retrievals Can READS ever get wrong values? Inconsistent with circumstances?

11 18 September 2008CIS 340 # 11 “Scheduler” The “Scheduler” Utility of DBMS Establishes order of operations among concurrent transaction How? Interleaves execution Uses concurrency control algorithms Ensures serializability Ensures isolation of transactions Goal: So two transactions do not update same data element at same time

12 18 September 2008CIS 340 # 12 “Scheduler” The “Scheduler”: Read/Write Conflict Matrix No problem if T1 and T2 access unrelated data Possible confliction: 1)Access same data 2)At least one of them is a Write operation

13 18 September 2008CIS 340 # 13 Locking Concurrency Control: Locking Lock –Excludes use of a data item –Required –Prevent reading inconsistent data Lock Manager –Assigns & polices locks Lock Granularity –Level of lock use Database Table Page Row Field –Enables different degrees of speed to the concurrencyDef:

14 Highlights Transaction log Keeps track of all transactions that modify database Concurrency control Coordinates simultaneous execution of transactions Scheduler Responsible for sequencing concurrent operations Lock Guarantees unique access to a data item Serializability Guaranteed through the use of two-phase locking Deadlock When two or more transactions wait indefinitely for each other to release lock Prevention; Detection; Avoidance Deadlock control techniques

15

16 18 September 2008CIS 340 # 16 Transactional Properties: ACID Test A A tomicity: atomic If several components must come together for a process, then each atomic process operates correctly or entire combination aborts C C onsistency: false or incorrect data is not introduced A service is correct when executed in its entirety and false or incorrect data is not introduced into the component databases I I solation: – isolated -- If several clients request the same service at the same time and access the same data, the overall result will be as if they were alone – isolated -- in the system D D urability: are complete and durable (have duration?) Completed transactions are complete and durable (have duration?) If necessary, redoing and undoing of changes in case of failures can occur TP-Monitor transactional coordination CLIENT services Application 1Application 3Application 2 user program CLIENT SERVER

17 18 September 2008CIS 340 # 17 Simple Batch Systems “Monitors” Software Controlled sequence of events Program branches back to monitor when finished Job Control Language (JCL) Special type of programming language Provides instruction to the monitor –What compiler to use? –What data to use?

18 18 September 2008CIS 340 # 18 Time Sharing Uses multiprogramming to handle multiple interactive jobs Processor’s time is shared among multiple users Multiple users simultaneously access the system through terminals

19 18 September 2008CIS 340 # 19 EX: Multiprogramming and Multiprocessing


Download ppt "18 September 2008CIS 340 # 1 Last Covered (almost)(almost) Variety of middleware mechanisms Gain? Enable n-tier architectures while not necessarily using."

Similar presentations


Ads by Google