Tuesday, May 25, 2010

Exercise 11: TP monitors and transaction protocols

1.Give a description in your own words of the ACID properties of a transaction.

Transaction is a set of operations which are executed sequentially in order to transform data from one consistent state to another one. The four important properties of a transaction are atomicity, consistency, isolation and durability.

Atomicity is a transaction property which guarantee that both a transaction itself and all its operations are atomic. This means that either all operations, which are part of the transaction, must be completely carried out or not carried out at all. So if one operation fails, the whole transaction fails.

Consistency ensures that data is always in a constistent state. For example, a transaction of money transfer between two parties A and B happenned, if money is transfered from account A to account B, the transaction must substract the same amout from account A that is added to account B.

Isolation means that although transactions can be executed concurrently, a transaction is not interfered by other transactions and the transactions appear to run serially.

Durability means that the results of a sucessful transaction are stored in permanent storage so that the results can not be affected because of subsequent failures (e.g. power cut, network disconnects).

2.Describe a TP monitor environment. How can a TP monitor stop an operating system being overwhelmed?

Ince (2004) defined that "a Trasaction Processing (TP) monitor is a complex computer program which manages the execution of a transaction starting with the client executing the transaction; it will normally employ a number of server and then return any results to the client". The two important jobs of a TP monitor are: first, it manages the execution of the threads and processes of the transaction and second it ensures the ACID properties of the transaction are enforced.

There are a number of functions which can be carried out by TP monitors. For example CICS monitor of IBM can initialize, schedlue and destroy threads to control transactions,manage resources are being accessed, enable services to be subcontracted to other servers for a better transaction processing ("Transaction Processing Monitors", 2004).

A large number of concurrent clients would overwhelm an operating system and cause a server's down. A TP monitor maintains a pool of processes and queues transactions so that they take turns using the pool. If system is running a lot of small jobs that require few resources, a TP monitor can add processes; but if system is running a big job that require more resources, a TP monitor shuts down some process in order to free the resources (Jianghui, 2005) . Hence, a TP monitor is balancing the system resources, meanwhile, it prevents overwhelming an OS.


References

Jianghui, L.(2005). TP Monitors. Retrieved on 10 May 2009 from http://web.njit.edu/~gblank/cis604/Lectures/604TPMonitor.ppt

Ince, D. (2004). Developing distributed and e-commerce applications (2nd Ed.), Harlow, Essex, UK: Addison – Wesley

Transaction Processing Monitors.(2004). Viewed 12 May 2010 from http://publib.boulder.ibm.com/infocenter/txformp/v5r1/index.jsp?topic=/com.ibm.txseries510.doc/atshak0014.htm

No comments:

Post a Comment