1 / 19

Last Covered (almost)

Last Covered (almost). Variety of middleware mechanisms Gain? Enable n-tier architectures while not necessarily using a browser and all that accompanies a distributed structure. Can you answer?. How are object-based MW different from message-based MW?

Download Presentation

Last Covered (almost)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Can you answer? How are object-based MW different from message-based MW? How is a “monitor” different from a “broker” system? CIS 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 CIS 340

  4. Def: 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 terminated CIS 340

  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 performed • 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. • Referential integrity concerns the concept of a foreign key.  • no child record can exist without a parent  CIS 340

  6. Classic Problems for Shared DBs Data integrity and consistency problems • Lost updates • Uncommitted data • Inconsistent retrievals CIS 340

  7. Problematic Execution Lost Updates Normal Execution: T1: PRO_QOH=PRO_QOH+100, T2: PRO_QOH=PRO_QOH-30 CIS 340

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

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

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

  11. 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 CIS 340

  12. The “Scheduler”: Read/Write Conflict Matrix • No problem if T1 and T2 access unrelated data • Possible confliction: • Access same data • At least one of them is a Write operation CIS 340

  13. 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 concurrency Def: Concurrency Control: Locking CIS 340

  14. Highlights

  15. CLIENT CLIENT Transactional Properties: ACID Test A tomicity: If several components must come together for a process, then each atomic process operates correctly or entire combination aborts C onsistency: A service is correct when executed in its entirety and false or incorrect data is not introduced into the component databases I solation: 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 urability: Completed transactions are complete and durable (have duration?) If necessary, redoing and undoing of changes in case of failures can occur services transactional coordination user program SERVER TP-Monitor Application 1 Application 2 Application 3 CIS 340

  16. 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? CIS 340

  17. 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 CIS 340

  18. EX: Multiprogramming and Multiprocessing CIS 340

More Related