Coddicted - Page 34 of 34 - Codes.Notes.Tutorials.

Tree Based Protocol 2

Tree Based Protocol
Only exclusive locks are allowed The first lock by Ti may be on any data item. Subsequently a data item Q can be locked by Ti only if the parent of Q is currently locked by Ti Data items may be unlocked at any time. A data item that has been locked and unlocked by ...

Graph Based Protocol

It impose partial ordering on the set D ={d1, d2, d3, …, dn} of all data items. If di -> dj , then any transaction accessing both di and dj must access di before accessing dj it implies that the set D may now be viewed as directed acyclic graph. Back To Top

Lock Based Protocol 2

Lock Based Protocol
A lock is a mechanism to control concurrent access to a data item. Data items can be locked in two modes 1. Exclusive(X) mode: Data item can be both read as well as written. X-lock is requested using lock-x instruction. 2. Shared(S)-mode: Data item can only be read. S-lock is requested using lock-s instruction Lock ...

Concurrency Control

Concurrency control in Database management systems ensures that database transactions are performed concurrently without violating the data integrity of the respective databases. Thus concurrency control is an essential element for correctness in any system where two database transactions or more, executed with time overlap, can access the same data, e.g., virtually in any general-purpose database ...

Cache Memory

A cache is a component that transparently stores data so the future requests for the data can be served faster.The data that is stored within a cache, might be values that have been computed earlier or duplicates of the original values that are stored elsewhere. Cache Hit, Cache Miss If requested data is contained in ...

Addressing Modes 1

Various Addressing modes as used in Computer Architecture: Register ADD R1,R2 ,R3 means : R1 comments : used when a value is in register Immediate ADD R1, R2 , 1 means : R1 comment : used when a constant is needed Direct ADD R1 , R2 , (100) means : R1 comment : used to ...

Change Boot Order – Ubuntu and Windows 7

Description : So you have a dual booting (Ubuntu and Windows) system?? Here is how to change the default OS when dual booting Ubuntu (10.10) and Windows 7 Note: applicable when GRUB is default boot loader Solution: 1. Open terminal. 2. cd /boot/grub 3. sudo gedit grub.cfg(menu.lst for previous versions) 4. provide password. 5. You’ll ...

Adding rows and columns in JTable dynamically 5

Adding rows and columns in JTable dynamically
Java Source code to add Row and Column in JTable dynamically package com.example; import java.awt.BorderLayout; import java.awt.EventQueue; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.Vector; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.WindowConstants; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableColumn; import javax.swing.table.TableColumnModel; public class JTableSample { private JFrame mainFrame ; private JTable ...

Russian Peasant Multiplication 2

Russian Peasant Multiplication
Description: Russian Peasant Multiplication. This program allows one to do multiplication by just doing muliplication or division by 2 (and addition). This is interesting since computers generally use base 2 arithmetic.The algorithm is as follows. Start two rows, one with the multiplicand (say, A) and the other the multiplier (say B). The goal is to ...

Mathematical Logic – Introduction

Mathematical Logic - Introduction
What is it?? It is a foundation which gives precise meaning to mathematical statements. It is the basis on which proofs and arguments rest (well, we are not referring to those court room arguments for sure. However, even those, we believe, could be expressed in terms of Mathematical Logic).   INTRODUCTION The basic building blocks ...