View on GitHub

os202

HOME


Top 10 List of Week 07

  1. Cooperating Process in Operating System
    Cooperating processes are those that can affect or are affected by other processes running on the system. Cooperating processes may share data with each other.
  2. Race Condition Sistem Operasi
    Race condition adalah suatu kondisi dimana dua atau lebih proses mengakses shared memory/sumber daya pada saat yang bersamaan dan hasil akhir dari data tersebut tergantung dari proses mana yang terakhir selesai dieksekusi sehingga hasil akhirnya terkadang tidak sesuai dengan yang dikehendaki.
  3. Bounded Buffer Problem
    Bounded buffer problem, which is also called producer consumer problem, is one of the classic problems of synchronization.
  4. Readers-Writers Problem
    The readers-writers problem relates to an object such as a file that is shared between multiple processes. To solve this situation, a writer should get exclusive access to an object i.e. when a writer is accessing the object, no reader or writer may access it.
  5. Dining Philosophers Problem (DPP)
    The dining philosophers problem states that there are 5 philosophers sharing a circular table and they eat and think alternatively. There is a bowl of rice for each of the philosophers and 5 chopsticks. A philosopher needs both their right and left chopstick to eat. A hungry philosopher may only eat if there are both chopsticks available.Otherwise a philosopher puts down their chopstick and begin thinking again.
  6. Difference between Deadlock and Starvation in OS
    Deadlock occurs when each process holds a resource and wait for other resource held by any other process. Starvation is the problem that occurs when high priority processes keep executing and low priority processes get blocked for indefinite time.
  7. What is Banker’s Algorithm?
    Banker’s algorithm is a deadlock avoidance algorithm. It is named so because this algorithm is used in banking systems to determine whether a loan can be granted or not.
  8. Mutex lock for Linux Thread Synchronization
    • A Mutex is a lock that we set before using a shared resource and release after using it.
    • When the lock is set, no other thread can access the locked region of code.
    • So we see that even if thread 2 is scheduled while thread 1 was not done accessing the shared resource and the code is locked by thread 1 using mutexes then thread 2 cannot even access that region of code.
    • So this ensures synchronized access of shared resources in the code. * * *
  9. Mutual Exclusion in Synchronization
    Mutual exclusion is a property of process synchronization which states that “no two processes can exist in the critical section at any given point of time”. The term was first coined by Djikstra. Any process synchronization technique being used must satisfy the property of mutual exclusion, without which it would not be possible to get rid of a race condition.
  10. Peterson’s Algorithm in Process Synchronization
    Peterson’s Algorithm is used to synchronize two processes. It uses two variables, a bool array flag of size 2 and an int variable turn to accomplish it.

«