Wednesday, May 12, 2010

Exercise 10

1. Find definitions for eight terms and concepts used in threaded programming:
1. Thread Synchronization
2. Locks
3. Deadlock
4. Semaphores
5. Mutex (mutual exclusion)
6. Thread
7. Event
8. Waitable timer.

1. Thread Synchronization - The ability to synchronize the activities of various threads. A thread synchronizes itself with another thread by putting itself to sleep. Before doing so, the thread notifies the operating system as to what event has to occur in order for the thread to resume execution.

IBM. (2004). T. Retrieved on 12 May 2010 from http://mail.serc.iisc.ernet.in/ComputingFacilities/systems/cluster/vac-7.0/html/glossary/czgt.htm

2. Locks – A lock is a special value that can be held by at most one thread.

University of Wisconsin. (n.d.) Locks, Semaphores and Monitors Lock Granularity and Access Deadlock. Retrieved on 13 May 2010 from
http://pages.cs.wisc.edu/~fischer/cs538.s07/lectures/Lecture37.4up.pdf

3. Deadlock - Two or more threads hold locks that other threads require. Each waits for the other thread to release a needed lock, and no thread is able to execute.

4. Semaphores – A semaphore is a signal to acquire or release a lock, usually it is an integer value (often just a single bit) with two atomic operations: up and down.

5. Mutex (mutual exclusion) - Mutual exclusion (often abbreviated to mutex) algorithms are used in concurrent programming to avoid the simultaneous use of a common resource,

6. Thread – A mechanism of executing concurrent operation, a thread of execution results from a fork of a computer program into two or more concurrently running tasks.

7. Event - Event-driven programming or event-based programming is a programming paradigm in which the flow of the program is determined by events—i.e., sensor outputs or user actions (mouse clicks, key presses) or messages from other programs orthreads.

Wiki. (2010). Event-driven programming. Retrieved on 13 May, 2010 from
http://en.wikipedia.org/wiki/Event-driven_programming

8. Waitable timer – A waitable timer object is a synchronization object whose state is set to signaled when the specified due time arrives. There are two types of waitable timers that can be created: manual-reset and synchronization. A timer of either type can also be a periodic timer.

MSDN. (2010). Waitable Timer object. Retrieved on 13 May 2010 from http://msdn.microsoft.com/en-us/library/ms687012(VS.85).aspx

No comments:

Post a Comment