1 / 38

Introducing Real-Time Databases

Introducing Real-Time Databases. By Phani Gowthami Tammineni. Overview. This presentation is about the issues in real-time database systems and presents an overview of the state of the art. Database and real-time systems. What are Real-Time Databases.

helene
Download Presentation

Introducing Real-Time Databases

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. Introducing Real-Time Databases By Phani Gowthami Tammineni

  2. Overview This presentation is about the issues in real-time database systems and presents an overview of the state of the art.

  3. Database and real-time systems

  4. What are Real-Time Databases • Real-Time database is a database system by definition which has queries, schemas, transactions, concurrency control support, commit protocols and storage management. • In a real-time database system timing constraints are associated with transactions and data are valid for specific time intervals. • The transaction timing constraints can be completion deadlines, start times, periodic invocations and so on…

  5. Databases Versus Real-Time Databases TRADITIONAL DATABASES • Traditional databases referred as simple databases deal with persistent data • Transactions access this data while maintaining consistency • Serializability is the correctness criterion associated with the transactions • The goal of transaction and query processing approaches adopted in database system is to achieve good throughput or response time

  6. Databases Versus Real-Time Databases REAL-TIME DATABASES • Real-time databases deal with temporal data i.e. data becomes outdated after certain time. • Due to temporal nature of the data tasks in real-time system posses time constraints such as deadlines or periods • The goal of real-time system is to meet the time constraints of the activities.

  7. CHARACTERISTICS OF REAL-TIME DATABASE SYSTEMS

  8. Characteristics of RTDBS • Data Types • Transaction Behaviors • Performance Issues

  9. Characteristics of RTDBS DATA CHARACTERSTICS • Depending on the applications, real-time system may have to handle multimedia information like audio, graphics and images. • Since systems are constantly recording the information data must have their temporal attributes recorded. • Some input devices may be to subject to noise degradation and need to record the quality of the attributes along with the data. • Systems must store execution history for maintenance or error recovery purpose

  10. Characteristics of RTDBS TRANSACTION CHARACTERSTICS • Transactions in real-time database system can be categorized as hard and soft transactions • Hard real-time transactions are those transactions whose timing constraints are guaranteed. Missing the deadlines of these transactions result in catastrophic consequences • Soft real-time transactions have timing constraints but there may be still some justification in completing the transaction after its deadline.

  11. Characteristics of RTDBS TRANSACTION CHARACTERSTICS • Transactions in real-time database system are used to record device readings or to handle system events. They are either periodic or event driven. • For periodic transactions most will perform updates in every period • Transactions triggered by events must take timely decisions

  12. Characteristics of RTDBS PERFORMANCE ISSUES • The most important performance criterion is the control of concurrent transactions in order to ensure that the effect of concurrent executions is equivalent to the effect of those transactions would have had, if they had been run in some serial order • The most important requirement for real-time application is to provide a feasible schedule so that transactions can meet their hard deadlines.

  13. Characteristics of RTDBS PERFORMANCE ISSUES • Systems should degrade gracefully since their applications are often safety-critical. • To make fast and correct decisions, data availability is critical to system performance

  14. Transaction scheduling

  15. Transaction Scheduling • Much of the work done on real-time job scheduling focuses mainly on CPU scheduling. • Transaction Scheduling however involves not only the CPU but also other resources such as data, I/O and memory. Algorithms for scheduling these resources will be discussed in the following sections of concurrency control, I/o Scheduling and Memory Management.

  16. Transaction Scheduling • In a RTDBS transactions should be scheduled according to their criticalness and the tightness of their deadlines, even if this means sacrificing fairness and system throughput. • A popular method is to assign a numeric priority to each transaction which reflects its relative urgency. • A transaction has many attributes that may affect its priority.

  17. Attributes that affect transaction priority • Criticalness • Deadline • Amount of unfinished work • Amount of computation already invested • Age • Slackness

  18. Concurrency control

  19. Concurrency Control • Concurrency control refers to the control of the interaction among concurrent transactions in such a way that database consistency is preserved. • Serializability is the most popular criterion in concurrency control. • Any inconsistency introduced by concurrent transactions does not spread too much over the database because data are often short-lived

  20. Concurrency Control • The prevalent approaches to concurrency control are lock based protocols and optimistic concurrency control protocols. • 2PL is the most common locking protocol in conventional database system. But these conventional locking protocols are unsatisfactory for RTDBS because of a) Priority Inversion Higher priority transaction waiting for lower priority one. b) Deadlock

  21. Concurrency Control • The problem is that we still let a low priority transaction block a higher priority transaction Solution:

  22. Concurrency Control • The problem is cyclic restart Solution:

  23. Concurrency Control Snapshot 2008-04-20 15-38-39.tiff Solution:

  24. I/O SCHEDULING

  25. I/O Scheduling • Disk I/O occupies a major portion of transaction execution time. • Disk scheduling algorithms taking timing constraints into account can significantly improve the real-time performance. • The order in which I/O requests are serviced has an immense impact on the response time and throughput of the I/O subsystem.

  26. Disk Scheduling Algorithms • Four requests in the I/O Queue: A, B, C, D • pr(A)>pr(B)>pr(C)>pr(D) For example

  27. Disk Scheduling Algorithms Highest Priority First (HPF): • Highest priority is served first HPF: A, B, C, D • The problem here is that it is not a very smart scheduling algorithm if throughput or response time is concern.

  28. Disk Scheduling Algorithms Elevator: • It moves the head from one end of the disk to the other and then back, servicing whatever requests are on its way and changing the direction whenever there are no more requests ahead in its direction. Elevator: D, B, C, A • Elevator principle says that “ do pick them up because the disk is already there”. • The problem here is that the priority of requests is not considered.

  29. Disk Scheduling Algorithms FD-SCAN: • FD-SCAN stands for feasible deadline scan • It targets the disk head towards the track with the highest priority request but also services the requests which are on its way. FD-SCAN: C, A, D, B • FD-Scan performs best among the algorithms tested in terms of the ability to meet deadlines.

  30. MEMORY MANAGEMENT

  31. Memory Management • This section is divided into two parts -- The dividing issue is whether memory space is tight or plentiful. If a real time system has limited amount of memory buffer management concerns the allocation of memory space. --Another one is, if memory is plentiful much of the data can reside in main store known as memory resident database systems

  32. Buffer Management • The goal here is that highest priority transaction is not hindered by the lack of memory. • The availability of memory affects transaction response time in two ways • First before a transaction starts its execution buffers have to be allocated to the transaction. These buffers are used to store execution code, copies of file and data paged in from disk.

  33. Buffer Management • Depending on the transaction, a certain number of buffers have to be allocated in order to prevent the transaction from thrashing. When memory is low transaction is blocked from execution. • Secondly some application such as image processing have high demands of memory. Their executions will be significantly slowed down if memory is tight and frequent memory swapping is done. • Thus the job of buffer manager is to allocate memory buffers to transactions intelligently such that higher priority transactions enjoy shorter response times.

  34. Memory Resident Database Systems • As the price of the memory continues to drop one possible remedy is to put data directly into memory, thus eliminating I/O accesses. • Main memory access time is much faster (1000-10000) and is more predictable (no disk access). • These features are very desirable in RTDB’s and may even be necessary if transactions have extremely tight time constraints.

  35. Memory Resident Database Systems DISADVANTAGES: • MRDBS is more costly than disk based systems. • There is still a limit on how much data can be memory resident. • Data stored in main memory usually do not survive through a power failure nor a CPU failure.

  36. CONCLUSION

  37. Conclusion • Discussed various issues concerning the design and implementation of real time databases and transaction processing. • Distinguished RTDBS from traditional database systems • CPU, data, I/O and memory scheduling were also discussed. • Thus the performance of real-time database systems is measured by how well the time constraints associated with transactions are met.

  38. QUERIES??????

More Related