unit 8: distributed DBMS reliability Flashcards

1
Q

Topics included in this topic

A

reliability concepts
failures and fault tolerance
failures in Distributed DBMS
Local reliability protocol
Distributed reliability protocol
dealing with site failure
dealing with network partitioning

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what will happen if system has some inputs

A

system will produce some outputs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is realibality

A

reliability is nothing but a measure of how far a system is working

OR

It is a measure used to indicate how successful a system is in providing the service it was intended

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Reliable proper definition

A

A system is considered a reliable if it functions as per its specifications and produces a correct output values for a given set of input values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is purpose of reliability

A

purpose of reliability is, ki ham database ki atomicity and durability ko kaise maintain kar sake

jab ki dono, atomicity and durability transaction ki properties he

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is reliable DBMS

A

a reliable DDBMS is the one which continues to process the user requests even when the system is unreliable i.e. even if the components of distributed computing fails, DDBMS should be able to continue execution of user request without violating database consistency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what does reliability refers to ?

A

reliability refers to atomicity and durability of transaction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

explain what is an availability ?

A
  • the fraction of the time that a system meet its specification
  • the probability that the system is operational at a given time t.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

which protocols address these issues of reliability

A

the protocol, which addresses these issues are commit & recovery protocol resp.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is meaning of failure

A

the failure occurs when system does not function according to specifications of a system

OR

the failure of a system occurs when the system does not function according to its specifications and fails to deliver the service for which it was intended

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is erroneous state

A

the internal state of a system such that there exists circumstances in which further processing, by the normal algorithms of the system, will lead to a failure which is not attributed to a subsequent fault

===

koi internal matter jisse further ki processing nahi hoti he, unn kuch internal faults ya incorrect state ki vajah se aap failure ki taraf jaa sakte he

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is an error

A

an error in the system occurs when a component of the system assumes a state that is not desirable the fact that the state is undesirable is a subjective judgeing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what are the types of errors / how errors are distinguished

A

errors are distinguished as, those which are permanent and those which are non-permanent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what is fault

A

a fault is detected either when an error is propagated from one component to another or failure of the component is observed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

fault to failure diagram

A

Fault [causes] Error [results in] Failure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

types of faults

A

Hard faults
Soft faults

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

how hard faults are further divided

A
  • permanent
  • resulting failures are called hard failures
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

explain soft faults

A
  • transient of intermittent
  • account for more than 90% of all failures
  • resulting failures are called soft failures
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

faults classification

A

three type of errors
1. permanent error
2. intermittent error
3. transient error

permanent fault and incorrect design causes, permanent error, leads to system failure

unstable or marginal components causes Internal error leads to system failure

unstable environment causes transient error leads to system failure

operator mistake leads to system failure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

what is fault-tolerant system

A

in addition to fault detection scheme, two system has redundant components and sub-system build in

on detection of a fault, these redundant components are used to replace the faulty components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

full form of MTBF

A

mean time between failure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

MTTR full form

A

mean time to repair

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

types of failure in DBMS

A
  1. hardware failures
  2. software failures
  3. storage medium failures
  4. implementation of stable storage
  5. communication failure
  6. transaction failure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

what are hardware failures divided into further

A
  • design errors
  • poor quality control
  • over utilization and overloading
  • wear out
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
system / site failure
- failures of processor, main memory, power supply - main memory contents are lost, but secondary storage contents are safe - partial vs total failure
26
Software failures
- design errors - poor quality control - over utilization and overloading - wear out
27
what are further storage medium failure divided into
- volatile storage - non-volatile storage - permanent or stable storage
28
which type of failures are common in both environment
1. hardware failure 2. software failures 3. system failures this failures are common in both environment
29
which failure is specific to distributed environment
- communication failure is specific to distributed environment only
30
1. explain communication failure 2. what are types of communication failure
all previous failures are common in both environment but communication failure is specific to distributed environment 2. types of communication failure - error in messages - improper ordering of messages - lost messages - line failures
31
which failures are handled by communication network
error in message and improper ordering of messages this errors are handled by communication software
32
what is responsibility of network software and hardware
network hardware and software are responsible for for ensuring that the messages reach from source to destination correctly & in order
33
how messages are lost
messages are lost due to line or site failures if communication link fails, the messages are lost but in addition network might get divided in disjoint parts, called as network partitions
34
what is network partitions
if communication link fails, the messages are lost but in addition network might get divided in disjoint parts, called as network partitions
35
how this network partitions create problem
if network gets partition, then sites in each partition can keep working but if a transaction tries to access data from two or more partitions, it can create problem - thus maintaining mutual consistency is a problem when database is replicated
36
whose responsibility it is to handle loss of messages
handling loss of messages is the responsibility of network software
37
what is performance failure
failure of communication network to deliver & receive messages in certain time periods is called performance Failure
38
media failures
- failures of secondary storage devices such that the stored data is lost - head crash / controller failure
39
communication failures
- lost / undeliverable messages - network partitioning
40
explain implementation of stable storage
- writing same block of data from volatile to stable storage in multiple for two or more times ensuring successful identified block writing
41
what is audit trails
audit trail is one record which is generated for each and every transaction and regarding the transaction it keeps certain information the information it stores like - who has initiated it - when it has been initiated - what is purpose - where it has initiated
42
audit trail
the audit trail records who ( user or the application program and a transaction number ), when ( time and data ), from where ( location of the data affected, as well as a before and after image of that portion of the database that was affected by the update operation ) in addition, a DBMS contains routines that make a backup copy of the data that is modified, this is done by taking a snapshot of the before and after image of that portion of the database that is modified. For obvious reasons, the backup are produced on a separate storage medium.
43
Explain local reliability protocols
44
what is Local Recovery Manager
LRM is a module of DBMS, which exists at each of the site.
45
what is function of Local recovery manager
Its function is to maintain atomicity and durability of local transactions.
46
what are commands handle by local recovery manager
the commands it handles are - begin transaction - read - write - commit - abort
47
architecture of local reliability protocol
secondary storage - stable DB Main memory - local recovery manager [ fetch / flush ] - database buffer manager [ write / read ] - database buffers volatile memory
48
what is Stable Database
the database, stored on stable storage device is known as stable database
49
what is volatile database
the data loaded in internal memory is called as volatile database
50
When does LRM issues fetch command
when Local Recovery Manager ( LRM ) wants to read a page on the behalf of transaction, i tissues Fetch command specifying page number to buffer manager
51
What is use of Flush command
LRM can also force the buffer manager to write the page on to disk. This can be done using Flush command
52
how buffer manager responds to fetch command
buffer manager responds to fetch command in following manner - searches buffer pool for required page - if not found allocates a free buffer page and loads required database page into it - if no free buffer is available, selects a buffer, vacates it & uses to load the page from stable database
53
how allocation of buffer pages is done
allocation of buffer pages is done dynamically
54
how buffer manager allocates pages to process
buffer manager finds out number of pages each process will need and accordingly attempts to allocate those many pages to each process
55
which is best known technique to replace buffer pages
to replace buffer pages the best known technique is Least recently used algorithm
56
what is recovery informatoin
when system fails it lost all volatile data and system must maintain some information about its state at the time of failure to restore consistency this is called recovery information https://www.youtube.com/watch?v=eq2EMu1Mh-w
57
on what methods recovery information depends
- in place update - out of place update
58
reliability issues are simpler if out of place updates are used. but most of the systems use in-place updates because of its efficiency
59
what are in-place update
60
out of place update
61
explain shadowing
- when update is done, this creates duplicate page called shadow page - https://www.youtube.com/watch?v=YA0sXVDoHig
62
what is differential file
https://www.youtube.com/watch?v=1xX68YYAMAM&t=147s
63
execution of LRM commands
64
log based database recovery
https://www.youtube.com/watch?v=0_DnBLn3nqg
65
explain redo and undo in recovery of database
https://www.youtube.com/watch?v=NzQetfezwp0
66
what is primary copy
https://youtu.be/RsudXqML-M8?list=PLV8vIYTIdSnbAW2wj_TiHyrFJId5zkhz2 -
67
what is primary site
68
check pointing
- https://www.youtube.com/watch?v=cQHriQKfA_c
69
what is majority locking
https://youtu.be/RsudXqML-M8?list=PLV8vIYTIdSnbAW2wj_TiHyrFJId5zkhz2
70
what is timestamping
- idea is that each transaction in the system is assigned a unique timestamp to determine the serialization order
71
how timestamping works in centralized scheme
72
how timestamping works in distributed scheme
73
74
75
76
77
2 Phase commit protocol write a short note on two phase commit protocol
- two phase commit protocol is used in distributed database systems - it is basically used as a recovery system in database - this has two phases 1. voting phase 2. decision phase there are two different type of sites - participant site - coordinator site in voting, participant vote that they want abort or commit in decision phase, coordinator site decides whether the transaction is completed or aborted - suppose we have transaction T1, which is started at site S1 - where transaction is started is known as coordinator site - this transaction is running on 3 different sites, S2, S3 and S4 - all other sites, where transaction is running is known as participating sites Now who will vote and who will participate - S2, S3 and S4 are participating sites, inke voting ke aadhar par S1 decide karega ki isko commit karna he ya abort karna he - kyunki S1 is coordinator site
78
how voting take place
- voting me jo bhi coordinator site he, S1 iss case me, wo apne log record me entry karta he jisko bolte he transaction T prepare [T, prepare] - iska matlab hota he ki this site is ready to commit or abort the transaction [ Ready to commit ] - aaur ye S1 wait kar rahi he ki baki ki sites commit karengi ya abort karengi - jab apne log me entry kar lega S1, tab baki ki sites ko message send karega S2 s3 and s4 ko ki, [T, prepare] - agar S2 ready he to wo apne log record me likh dega, [ T, ready ] - agar S3 ready he to [ T, ready ] - S4 [T, not-ready ] === depending on this votes S1 will decide whethere to commit or abort this transaction
79
decision phase of 2 phase commit
decision phase ke andar do rules hote he, 1. agar sabse ready milta he, [ Ready, T ] message then commit 2. if atleast one [ not-ready, T ] then abort the transaction S1 will abort transaction if any one of participant has voted for not-ready
80
why 2 phase name like this
there are two phases 1. voting phase 2. decision phase
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212