Friday, May 8, 2009

Exercise 17: Concurrency Terms

1. Thread Synchronisation requires that a running thread gain a "lock" on an object before it can access it. The thread will wait in line for another thread that is using the method/data member to be done with it. This is very important to prevent the corruption of program data if multiple threads will be accessing the same data. If two threads try to change a variable or execute the same method at the same, this can cause serious and difficult to find problems. Thread synchronization helps prevent this. (Wikianswer, 2009)
2. Locks is a technique that prevents processing of a file by more than one program or user at a time, ensuring that a file in use by one user is made unavailable to others. (Wikianswer, 2009)
3. A deadlock is a situation wherein two or more competing actions are waiting for the other to finish, and thus neither ever does.(Wikianswer, 2009)
4. Semaphores is hardware or software flag used to indicate the status of some activity.(Wikianswer, 2009)
5. Mutex (mutal exclusion) is programming flag used to grab and release an object. When data are acquired that cannot be shared or processing is started that cannot be performed simultaneously elsewhere in the system, the mutex is set to "lock," which blocks other attempts to use it. The mutex is set to "unlock" when the data are no longer needed or the routine is finished. (Wikianswer, 2009)
6. Thread in computer programming, a thread is placeholder information associated with a single use of a program that can handle multiple concurrent users. From the program's point-of-view, a thread is the information needed to serve one individual user or a particular service request. If multiple users are using the program or concurrent requests from other programs occur, a thread is created and maintained for each of them. The thread allows a program to know which user is being served as the program alternately gets re-entered on behalf of different users. (One way thread information is kept by storing it in a special data area and putting the address of that data area in a register. The operating system always saves the contents of the register when the program is interrupted and restores it when it gives the program control again.)(Wikianswer, 2009)
7. The language was organized around a series of events. Each time an event happened (for example, mouse click, pulling down a menu), the program would respond.(Wikianswer, 2009)
8. Waitable timer is a kernel object that is signaled at a certain time or at regular intervals. An asynchronous procedure call (APC) can be associated with a waitable timer to allow a callback function to be executed whenever the timer is signaled. The sample code in this article demonstrates how to do this. (Microsoft, 2006)
References
1. Wikianswer, 2009 " Thread Synchronisation"
2. Wikianswer, 2009, " File-Locking"
3. Wikianswer, 2009, " Deadlock"
4. Wikianswer, 2009, "Semaphores"
5. Wikianswer, 2009, " Mutex"
6. Wikianswer, 2009, " Definition of Thread"
7. Wikianswer, 2009." Event"
8. Microsoft, 2006," How To Use a Waitable Timer with an Asynchronous Procedure Call"

No comments:

Post a Comment