Algorithm-1: Transaction Sorter |
Input: WQ: Waiting Queue. Output: WRQ: Waiting Read Queue, WWQ: Waiting Write Queue. 1: WHILE (thread is not stoped) 2: currentTO ← WQ.take(); 3: T ← calTransType(currentTO); 4: IF (T='R') THEN 5: WRQ.put(currentTO); 6: ELSE 7: currentTO.AllKeys ← calAllKeys(); 8: WWQ.put(currentTO); 9: END IF 10: END WHILE |