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
Q

system / site failure

A
  • failures of processor, main memory, power supply
  • main memory contents are lost, but secondary storage contents are safe
  • partial vs total failure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Software failures

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
27
Q

what are further storage medium failure divided into

A
  • volatile storage
  • non-volatile storage
  • permanent or stable storage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

which type of failures are common in both environment

A
  1. hardware failure
  2. software failures
  3. system failures

this failures are common in both environment

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

which failure is specific to distributed environment

A
  • communication failure is specific to distributed environment only
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q
  1. explain communication failure
  2. what are types of communication failure
A

all previous failures are common in both environment but communication failure is specific to distributed environment

  1. types of communication failure
    - error in messages
    - improper ordering of messages
    - lost messages
    - line failures
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

which failures are handled by communication network

A

error in message and
improper ordering of messages

this errors are handled by communication software

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

what is responsibility of network software and hardware

A

network hardware and software are responsible for for ensuring that the messages reach from source to destination correctly & in order

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

how messages are lost

A

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

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

what is network partitions

A

if communication link fails, the messages are lost but in addition network might get divided in disjoint parts, called as network partitions

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

how this network partitions create problem

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

whose responsibility it is to handle loss of messages

A

handling loss of messages is the responsibility of network software

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

what is performance failure

A

failure of communication network to deliver & receive messages in certain time periods is called performance Failure

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

media failures

A
  • failures of secondary storage devices such that the stored data is lost
  • head crash / controller failure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

communication failures

A
  • lost / undeliverable messages
  • network partitioning
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

explain implementation of stable storage

A
  • writing same block of data from volatile to stable storage in multiple for two or more times ensuring successful identified block writing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

what is audit trails

A

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

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

audit trail

A

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.

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

Explain local reliability protocols

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

what is Local Recovery Manager

A

LRM is a module of DBMS, which exists at each of the site.

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

what is function of Local recovery manager

A

Its function is to maintain atomicity and durability of local transactions.

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

what are commands handle by local recovery manager

A

the commands it handles are

  • begin transaction
  • read
  • write
  • commit
  • abort
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

architecture of local reliability protocol

A

secondary storage
- stable DB

Main memory
- local recovery manager
[ fetch / flush ]
- database buffer manager
[ write / read ]
- database buffers volatile memory

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

what is Stable Database

A

the database, stored on stable storage device is known as stable database

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

what is volatile database

A

the data loaded in internal memory is called as volatile database

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

When does LRM issues fetch command

A

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

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

What is use of Flush command

A

LRM can also force the buffer manager to write the page on to disk.

This can be done using Flush command

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

how buffer manager responds to fetch command

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

how allocation of buffer pages is done

A

allocation of buffer pages is done dynamically

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

how buffer manager allocates pages to process

A

buffer manager finds out number of pages each process will need and accordingly attempts to allocate those many pages to each process

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

which is best known technique to replace buffer pages

A

to replace buffer pages the best known technique is Least recently used algorithm

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

what is recovery informatoin

A

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

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

on what methods recovery information depends

A
  • in place update
  • out of place update
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

reliability issues are simpler if out of place updates are used.

but most of the systems use in-place updates because of its efficiency

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

what are in-place update

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

out of place update

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

explain shadowing

A
  • when update is done, this creates duplicate page called shadow page

-

https://www.youtube.com/watch?v=YA0sXVDoHig

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

what is differential file

A

https://www.youtube.com/watch?v=1xX68YYAMAM&t=147s

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

execution of LRM commands

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

log based database recovery

A

https://www.youtube.com/watch?v=0_DnBLn3nqg

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

explain redo and undo in recovery of database

A

https://www.youtube.com/watch?v=NzQetfezwp0

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

what is primary copy

A

https://youtu.be/RsudXqML-M8?list=PLV8vIYTIdSnbAW2wj_TiHyrFJId5zkhz2

-

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

what is primary site

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

check pointing

A

https://www.youtube.com/watch?v=cQHriQKfA_c

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

what is majority locking

A

https://youtu.be/RsudXqML-M8?list=PLV8vIYTIdSnbAW2wj_TiHyrFJId5zkhz2

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

what is timestamping

A
  • idea is that each transaction in the system is assigned a unique timestamp to determine the serialization order
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
71
Q

how timestamping works in centralized scheme

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

how timestamping works in distributed scheme

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
73
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
74
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
75
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
76
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
77
Q

2 Phase commit protocol
write a short note on two phase commit protocol

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
78
Q

how voting take place

A
  • 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

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

decision phase of 2 phase commit

A

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

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

why 2 phase name like this

A

there are two phases

  1. voting phase
  2. decision phase
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
81
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
82
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
83
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
84
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
85
Q
A
86
Q
A
87
Q
A
88
Q
A
89
Q
A
90
Q
A
91
Q
A
92
Q
A
93
Q
A
94
Q
A
95
Q
A
96
Q
A
97
Q
A
98
Q
A
99
Q
A
100
Q
A
101
Q
A
102
Q
A
103
Q
A
104
Q
A
105
Q
A
106
Q
A
107
Q
A
108
Q
A
109
Q
A
110
Q
A
111
Q
A
112
Q
A
113
Q
A
114
Q
A
115
Q
A
116
Q
A
117
Q
A
118
Q
A
119
Q
A
120
Q
A
121
Q
A
122
Q
A
123
Q
A
124
Q
A
125
Q
A
126
Q
A
127
Q
A
128
Q
A
129
Q
A
130
Q
A
131
Q
A
132
Q
A
133
Q
A
134
Q
A
135
Q
A
136
Q
A
137
Q
A
138
Q
A
139
Q
A
140
Q
A
141
Q
A
142
Q
A
143
Q
A
144
Q
A
145
Q
A
146
Q
A
147
Q
A
148
Q
A
149
Q
A
150
Q
A
151
Q
A
152
Q
A
153
Q
A
154
Q
A
155
Q
A
156
Q
A
157
Q
A
158
Q
A
159
Q
A
160
Q
A
161
Q
A
162
Q
A
163
Q
A
164
Q
A
165
Q
A
166
Q
A
167
Q
A
168
Q
A
169
Q
A
170
Q
A
171
Q
A
172
Q
A
173
Q
A
174
Q
A
175
Q
A
176
Q
A
177
Q
A
178
Q
A
179
Q
A
180
Q
A
181
Q
A
182
Q
A
183
Q
A
184
Q
A
185
Q
A
186
Q
A
187
Q
A
188
Q
A
189
Q
A
190
Q
A
191
Q
A
192
Q
A
193
Q
A
194
Q
A
195
Q
A
196
Q
A
197
Q
A
198
Q
A
199
Q
A
200
Q
A
201
Q
A
202
Q
A
203
Q
A
204
Q
A
205
Q
A
206
Q
A
207
Q
A
208
Q
A
209
Q
A
210
Q
A
211
Q
A
212
Q
A