Top 10 List of Week 07

  1. Semaphore
    The website gives good explanations about semaphores in process synchronization. There are code examples and illustrations in the website so we can understand the topics better. Semaphore is simply a variable which is non-negative and shared between threads. This variable is used to solve the critical section problem and to achieve process synchronization in the multiprocessing environment.

  2. POSIX Semaphores
    The website provides some kind of a tutorial on implementing POSIX semaphores. It gives examples and also explanations on POSIX semaphore functions. Tutorial often gives better understandable method of studying.

  3. Thread Signaling
    The purpose of thread signaling is to enable threads to send signals to each other. Additionally, thread signaling enables threads to wait for signals from other threads. For instance, a thread B might wait for a signal from thread A indicating that data is ready to be processed.

  4. Critical Section
    The webiste mainly explains about process synchronization and critical section problem. The discussed topics: what process synchronization is, how process synchronization works, sections of a program, what critical section problem is, rules and solutions to critical section problem.

  5. Deadlock Prevention
    eadlock prevention algorithms are used in concurrent programming when multiple processes must acquire more than one shared resource. If two or more concurrent processes obtain multiple resources indiscriminately, a situation can occur where each process has a resource needed by another process. As a result, none of the processes can obtain all the resources it needs, so all processes are blocked from further execution. This situation is called a deadlock. A deadlock prevention algorithm organizes resource usage by each process to ensure that at least one process is always able to get all the resources it needs.

  6. Deadlock Example
    This is an example of deadlock in the form of job interview. The interview does not end. You should understand how much of a threat a deadlock is.

  7. Exitting a deadlock
    You don’t. There saying Prevention is better than cure but in this case there is absolutely no cure. All you have to do is prevent deadlocks happening as best as possible.

  8. Livelock
    When there is ‘Dead’ there should be ‘Live’. Livelock is a situation where a request for an exclusive lock is denied repeatedly, as many overlapping shared locks keep on interfering each other. The processes keep on changing their status, which further prevents them from completing the task. This further prevents them from completing the task.

  9. Banker’s Algorithm
    The Banker algorithm is a resource allocation and deadlock avoidance algorithm developed by Edsger Dijkstra. It tests for safety by simulating the allocation of predetermined maximum possible amounts of all resources, and then makes an “s-state” check to test for possible deadlock conditions for all other pending activities. Some of the resources that are tracked in real systems are memory, semaphores and interface access.

  10. Cooperating Process
    A cooperating process is one that can affect or be affected by other processes running on the system. Cooperating processes can either directly share a logical address space or be allowed to share data only through shared memory or message passing. This is what leads to the infamous deadlock.