Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 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

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

6

7

8 Characteristics of RTDBS  Data Types  Transaction Behaviors  Performance Issues

9 Characteristics of RTDBS

10

11

12

13

14

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

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

22 Concurrency Control  The problem is cyclic restart

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

24

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 For example  Four requests in the I/O Queue: A, B, C, D  pr(A)>pr(B)>pr(C)>pr(D)

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

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

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


Download ppt "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."

Similar presentations


Ads by Google