Click here to Skip to main content
15,918,808 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: A* & Genetic Algorithms Pin
Mustafa Ismail Mustafa28-Dec-08 20:49
Mustafa Ismail Mustafa28-Dec-08 20:49 
Jokeurgent! Pin
Mark Churchill24-Dec-08 23:25
Mark Churchill24-Dec-08 23:25 
GeneralRe: urgent! Pin
73Zeppelin28-Dec-08 5:29
73Zeppelin28-Dec-08 5:29 
Questionmpeg 2 sync ( & a little hardware ) Pin
bulg24-Dec-08 8:20
bulg24-Dec-08 8:20 
QuestionCalculating the longest path Pin
zenerguy3223-Dec-08 20:15
zenerguy3223-Dec-08 20:15 
AnswerRe: Calculating the longest path Pin
73Zeppelin28-Dec-08 5:13
73Zeppelin28-Dec-08 5:13 
GeneralRe: Calculating the longest path Pin
zenerguy3230-Dec-08 10:04
zenerguy3230-Dec-08 10:04 
GeneralRe: Calculating the longest path Pin
73Zeppelin31-Dec-08 2:07
73Zeppelin31-Dec-08 2:07 
GeneralRe: Calculating the longest path Pin
zenerguy3231-Dec-08 7:24
zenerguy3231-Dec-08 7:24 
Questiontext diff Pin
m-khansari21-Dec-08 19:55
m-khansari21-Dec-08 19:55 
AnswerRe: text diff Pin
73Zeppelin22-Dec-08 6:08
73Zeppelin22-Dec-08 6:08 
GeneralRe: text diff Pin
m-khansari24-Dec-08 22:55
m-khansari24-Dec-08 22:55 
QuestionRadian angle to Quaternion Pin
shaibee18-Dec-08 3:29
shaibee18-Dec-08 3:29 
AnswerRe: Radian angle to Quaternion Pin
73Zeppelin18-Dec-08 3:42
73Zeppelin18-Dec-08 3:42 
GeneralRe: Radian angle to Quaternion Pin
shaibee18-Dec-08 4:01
shaibee18-Dec-08 4:01 
GeneralRe: Radian angle to Quaternion Pin
73Zeppelin18-Dec-08 4:48
73Zeppelin18-Dec-08 4:48 
QuestionPseudocode implementation of the strict timestamp protocol for ensuring serializability, recoverability and cascadeless roll-backs [modified] Pin
efgtdg17-Dec-08 10:07
efgtdg17-Dec-08 10:07 
Semantics:

write_item(X): is the operation of writing the value of record X in the database
read_item(X): is the operation of reading the value of record X in the database
TS(T) : is the Time Stamp of a transaction in the database, each transaction may include many operations before it is either committed or rolled-back, e.g. write_item(X), read_item(Z), write_item(W)
write_TS(X): is the TS(T) of transaction T that has successfully written record X
read_TS(X): is the TS(T) of transaction T that has successfully read record X

Strict time stamp ordering

// read_item(X) by T
read_item(X)
{

while(true)
{
if( write_TS(X) > TS(T) )
{
abort(T); // break or return
}
else if( write_TS(X) < TS(T) )
{
wait until the transaction T', which TS(T) > TS(T'), has
either committed or aborted; // write_TS(X) == TS(T')
continue;
}
else
{
read_item(X);
read_TS(X) = max{ read_TS(X), TS(T) };
break; // or return
}
}
}

// write_item(X) by T

write_item(X)
{
while(true)
{
if( write_TS(X) > TS(T) || read_TS(X) > TS(T) )
{
abort(T); // break or return
}
else if( write_TS(X) < TS(T) )
{
wait until the transaction T', which TS(T) > TS(T'), has
either committed or aborted; // write_TS(X) == TS(T')
continue;
}
else
{
write_item(X);
write_TS(X) = TS(T);
break; // or return
}
}
}

<div class="ForumMod">modified on Wednesday, December 17, 2008 4:16 PM</div>
AnswerRe: Pseudocode implementation of the strict timestamp protocol for ensuring serializability, recoverability and cascadeless roll-backs Pin
73Zeppelin17-Dec-08 22:17
73Zeppelin17-Dec-08 22:17 
GeneralRe: Pseudocode implementation of the strict timestamp protocol for ensuring serializability, recoverability and cascadeless roll-backs Pin
efgtdg18-Dec-08 0:39
efgtdg18-Dec-08 0:39 
GeneralRe: Pseudocode implementation of the strict timestamp protocol for ensuring serializability, recoverability and cascadeless roll-backs Pin
73Zeppelin18-Dec-08 2:00
73Zeppelin18-Dec-08 2:00 
GeneralRe: Pseudocode implementation of the strict timestamp protocol for ensuring serializability, recoverability and cascadeless roll-backs Pin
efgtdg19-Dec-08 0:51
efgtdg19-Dec-08 0:51 
GeneralRe: Pseudocode implementation of the strict timestamp protocol for ensuring serializability, recoverability and cascadeless roll-backs Pin
73Zeppelin19-Dec-08 2:30
73Zeppelin19-Dec-08 2:30 
QuestionQuestion from my Phone Interview Pin
BobInNJ15-Dec-08 10:17
BobInNJ15-Dec-08 10:17 
GeneralSum Pin
Luc Pattyn15-Dec-08 11:19
sitebuilderLuc Pattyn15-Dec-08 11:19 
AnswerRe: Question from my Phone Interview Pin
Member 419459315-Dec-08 11:47
Member 419459315-Dec-08 11:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.