The document discusses database crash recovery. It explains that crash recovery is needed to restore the database to a consistent state after failures like system crashes or hardware errors. It describes the log-based recovery process used by database management systems, including writing log records, undo/redo operations, and using checkpoints to optimize the recovery process. The sources of failures and the need for backup and recovery from catastrophic failures are also covered.
ACID properties
Atomicity, Consistency, Isolation, Durability
Transactions should possess several properties, often called the ACID properties; they should be enforced by the concurrency control and recovery methods of the DBMS.
ACID properties
Atomicity, Consistency, Isolation, Durability
Transactions should possess several properties, often called the ACID properties; they should be enforced by the concurrency control and recovery methods of the DBMS.
Virtual Memory
• Copy-on-Write
• Page Replacement
• Allocation of Frames
• Thrashing
• Operating-System Examples
Background
Page Table When Some PagesAre Not in Main Memory
Steps in Handling a Page Fault
A brief introduction to Process synchronization in Operating Systems with classical examples and solutions using semaphores. A good starting tutorial for beginners.
This presentation discusses the following topics:
What is Recovery ?
Database Recovery techniques
System log
Working of Commit and Roll back
Recovery techniques
Backup techniques
Virtual Memory
• Copy-on-Write
• Page Replacement
• Allocation of Frames
• Thrashing
• Operating-System Examples
Background
Page Table When Some PagesAre Not in Main Memory
Steps in Handling a Page Fault
A brief introduction to Process synchronization in Operating Systems with classical examples and solutions using semaphores. A good starting tutorial for beginners.
This presentation discusses the following topics:
What is Recovery ?
Database Recovery techniques
System log
Working of Commit and Roll back
Recovery techniques
Backup techniques
What is Database Backup? The 3 Important Recovery Techniques from transaction...Raj vardhan
What is Database Backup?
What is Database recovery techniques
Why recovery is needed? (What causes a Transaction to fail?)
The 3 Important Recovery Techniques from transaction failures:
The figure below illustrates the use of Shadow paging techniques:
Process management in Operating System_Unit-2mohanaps
In this PPT Of operating system it covers:
Process Concept; Process Control Block; Process Scheduling; CPU Scheduling - Basic Concepts; Scheduling Algorithms – FIFO; RR; SJF; Multi- level; Multi-level feedback. Process Synchronization and deadlocks: The Critical Section Problem; Synchronization hardware; Semaphores; Classical problems; Deadlock: System model; Characterization; Deadlock prevention; Avoidance and Detection.
Explore our comprehensive data analysis project presentation on predicting product ad campaign performance. Learn how data-driven insights can optimize your marketing strategies and enhance campaign effectiveness. Perfect for professionals and students looking to understand the power of data analysis in advertising. for more details visit: https://bostoninstituteofanalytics.org/data-science-and-artificial-intelligence/
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Subhajit Sahu
Abstract — Levelwise PageRank is an alternative method of PageRank computation which decomposes the input graph into a directed acyclic block-graph of strongly connected components, and processes them in topological order, one level at a time. This enables calculation for ranks in a distributed fashion without per-iteration communication, unlike the standard method where all vertices are processed in each iteration. It however comes with a precondition of the absence of dead ends in the input graph. Here, the native non-distributed performance of Levelwise PageRank was compared against Monolithic PageRank on a CPU as well as a GPU. To ensure a fair comparison, Monolithic PageRank was also performed on a graph where vertices were split by components. Results indicate that Levelwise PageRank is about as fast as Monolithic PageRank on the CPU, but quite a bit slower on the GPU. Slowdown on the GPU is likely caused by a large submission of small workloads, and expected to be non-issue when the computation is performed on massive graphs.
As Europe's leading economic powerhouse and the fourth-largest hashtag#economy globally, Germany stands at the forefront of innovation and industrial might. Renowned for its precision engineering and high-tech sectors, Germany's economic structure is heavily supported by a robust service industry, accounting for approximately 68% of its GDP. This economic clout and strategic geopolitical stance position Germany as a focal point in the global cyber threat landscape.
In the face of escalating global tensions, particularly those emanating from geopolitical disputes with nations like hashtag#Russia and hashtag#China, hashtag#Germany has witnessed a significant uptick in targeted cyber operations. Our analysis indicates a marked increase in hashtag#cyberattack sophistication aimed at critical infrastructure and key industrial sectors. These attacks range from ransomware campaigns to hashtag#AdvancedPersistentThreats (hashtag#APTs), threatening national security and business integrity.
🔑 Key findings include:
🔍 Increased frequency and complexity of cyber threats.
🔍 Escalation of state-sponsored and criminally motivated cyber operations.
🔍 Active dark web exchanges of malicious tools and tactics.
Our comprehensive report delves into these challenges, using a blend of open-source and proprietary data collection techniques. By monitoring activity on critical networks and analyzing attack patterns, our team provides a detailed overview of the threats facing German entities.
This report aims to equip stakeholders across public and private sectors with the knowledge to enhance their defensive strategies, reduce exposure to cyber risks, and reinforce Germany's resilience against cyber threats.
Adjusting primitives for graph : SHORT REPORT / NOTESSubhajit Sahu
Graph algorithms, like PageRank Compressed Sparse Row (CSR) is an adjacency-list based graph representation that is
Multiply with different modes (map)
1. Performance of sequential execution based vs OpenMP based vector multiply.
2. Comparing various launch configs for CUDA based vector multiply.
Sum with different storage types (reduce)
1. Performance of vector element sum using float vs bfloat16 as the storage type.
Sum with different modes (reduce)
1. Performance of sequential execution based vs OpenMP based vector element sum.
2. Performance of memcpy vs in-place based CUDA based vector element sum.
3. Comparing various launch configs for CUDA based vector element sum (memcpy).
4. Comparing various launch configs for CUDA based vector element sum (in-place).
Sum with in-place strategies of CUDA mode (reduce)
1. Comparing various launch configs for CUDA based vector element sum (in-place).
2. • The entire DBMS is a very complex structure with multiple transactions being
performed and carried out in every second
• The toughness and strength of a system depend not only to the complex and
secured architecture of a system but also in the way how data are managed and
maintained in the worst cases.
• If the underlying architecture fails or crashes, then there must be some
techniques and procedures by which the lost data during a transaction gets
recovered
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
3. What is Crash Recovery?
• It is the method of restoring the database to its correct state in the event of a
failure
• Recovery is a service which should be provided by all the DBMS for ensuring that
the database is dependable and remains in a consistent state in the presence of
failures time of the transaction or after the end of a process
• In this context, dependability refers to both the flexibility of the DBMS to various
kinds of failure and its ability to recover from those failures
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
4. What is the need of recovery of database?
• The storage of data usually includes four types of media with an increasing
amount of reliability: the main memory, the magnetic disk, the magnetic tape,
and the optical disk
• There are many different forms of failure that can have an effect on database
• Some data failures can affect main memory only, while others involve non-
volatile or secondary storage also
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
5. The sources of failure:
• Due to hardware or software errors, the system crashes which ultimately resulting in loss of main
memory
• Failures of media, such as head crashes or unreadable media that results in the loss of portions of
secondary storage
• There can be application software errors, such as logical errors which are accessing the database that
can cause one or more transactions to abort or fail
• Natural physical disasters can also occur such as fires, floods, earthquakes, or power failures
• Carelessness or unintentional destruction of data or directories by operators or users
• Damage or intentional corruption or hampering of data (using malicious software or files) hardware or
software facilities
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
6. Crash Recovery
Whatever the grounds of the failure are, there are two principal things that you
have to consider:
• Failure of main memory including that database buffers
• Failure of the disk copy of that database
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
7. Recovery facility
• Every DBMS should offer the following facilities to help out with the recovery
mechanism:
• Backup mechanism makes backup copies at a specific interval for the database
• Logging facilities keep tracing the current state of transactions and any changes made to
the database
• Checkpoint facility allows updates to the database for getting the latest patches to be made
permanent and keep secure from vulnerability
• Recovery manager allows the database system for restoring the database to a reliable and
steady state after any failure occurs
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
8. Log based Recovery in DBMS
• Atomicity property of DBMS states that either all the operations of transactions
must be performed or none
• The modifications done by an aborted transaction should not be visible to
database and the modifications done by committed transaction should be visible
• To achieve our goal of atomicity, user must first output to stable storage
information describing the modifications, without modifying the database itself
• This information can help us ensure that all modifications performed by
committed transactions are reflected in the database
• This information can also help us ensure that no modifications made by an
aborted transaction persist in the database
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
9. Log and log records –
• The log is a sequence of log records, recording all the update activities in the
database
• In a stable storage, logs for each transaction are maintained
• Any operation which is performed on the database is recorded is on the log Prior
to performing any modification to database, an update log record is created to
reflect that modification
• An update log record represented as: <Ti, Xj, V1, V2> has these fields:
• Transaction identifier: Unique Identifier of the transaction that performed the write operation
• Data item: Unique identifier of the data item written
• Old value: Value of data item prior to write
• New value: Value of data item after write operation
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
10. • Other type of log records are:
• <Ti start>: It contains information about when a transaction Ti starts
• <Ti commit>: It contains information about when a transaction Ti commits
• <Ti abort>: It contains information about when a transaction Ti aborts
• Undo and Redo Operations –
• Because all database modifications must be preceded by creation of log record, the system
has available both the old value prior to modification of data item and new value that is to
be written for data item
• Undo: using a log record sets the data item specified in log record to old value.
• Redo: using a log record sets the data item specified in log record to new value.
Log and log records –
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
11. The database can be modified using two
approaches –
• Deferred Modification Technique: If the transaction does not modify the
database until it has partially committed, it is said to use deferred modification
technique.
• Immediate Modification Technique: If database modification occur while
transaction is still active, it is said to use immediate modification technique.
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
12. Recovery using Log records –
• After a system crash has occurred, the system consults the log to determine
which transactions need to be redone and which need to be undone.
• Transaction Ti needs to be undone if the log contains the record <Ti start> but does not
contain either the record <Ti commit> or the record <Ti abort>
• Transaction Ti needs to be redone if log contains record <Ti start> and either the record
<Ti commit> or the record <Ti abort>
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
13. Use of Checkpoints cntd…
• When a system crash occurs, user must consult the log.
• In principle, that need to search the entire log to determine this information.
• There are two major difficulties with log based approach:
• The search process is time-consuming
• Most of the transactions that, according to our algorithm, need to be redone have already written
their updates into the database. Although redoing them will cause no harm, it will cause recovery
to take longer.
• To reduce these types of overhead, user introduce checkpoints
• A log record of the form <checkpoint L> is used to represent a checkpoint in log where
L is a list of transactions active at the time of the checkpoint
• When a checkpoint log record is added to log all the transactions that have committed
before this checkpoint have <Ti commit> log record before the checkpoint record
• Any database modifications made by Ti is written to the database either prior to the
checkpoint or as part of the checkpoint itself
• Thus, at recovery time, there is no need to perform a redo operation on TiProf. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
14. • After a system crash has occurred, the system examines the log to find the last
<checkpoint L> record
• The redo or undo operations need to be applied only to transactions in L, and to
all transactions that started execution after the record was written to the log
• Let us denote this set of transactions as T
• Same rules of undo and redo are applicable on T as mentioned in Recovery using
Log records part
Use of Checkpoints cntd…
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
15. • When a system with concurrent transactions crashes and recovers, it behaves in
the following manner −
Use of Checkpoints cntd…
•It maintains two lists, an undo-list and a redo-list
•he recovery system reads the logs backwards from the end to the last checkpoint
•If the recovery system sees a log with <Tn, Start> and <Tn, Commit> or just <Tn, Commit>, it puts the
transaction in the redo-list
•If the recovery system sees a log with <Tn, Start> but no commit or abort log found, it puts the
transaction in undo-list
All the transactions in the undo-list are then undone and their logs are removed
All the transactions in the redo-list and their previous logs are removed and then redone before
saving their logs. Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
16. Database Backup & Recovery from Catastrophic
Failure
• A catastrophic failure is one where a stable, secondary storage device gets
corrupt
• With the storage device, all the valuable data that is stored inside is lost
• We have two different strategies to recover data from such a catastrophic
failure −
• Remote backup : Here a backup copy of the database is stored at a remote location from
where it can be restored in case of a catastrophe.
• Alternatively, database backups can be taken on magnetic tapes and stored at a safer
place. This backup can later be transferred onto a freshly installed database to bring it to
the point of backup.
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
17. Remote Backup
• Remote backup provides a sense of security in case the primary location where the
database is located gets destroyed
• Remote backup can be offline or real-time or online
• In case it is offline, it is maintained manually
• Online backup systems are more real-time and lifesavers for database administrators
and investors
• An online backup system is a mechanism where every bit of the real-time data is backed
up simultaneously at two distant places, one of them is directly connected to the
system and the other one is kept at a remote place as backup
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU
19. • As soon as the primary database storage fails, the backup system senses the
failure and switches the user system to the remote storage
• Sometimes this is so instant that the users can’t even realize a failure
Remote Backup
Prof. Nilesh Magar, Dr. Vishwanath Karad, MITWPU