View on GitHub

os202

OS202


Home

This week’s material is pretty hard, do take your time to learn about this topic from multiple sources, not limited to the links below. Additional Resources Below

How I grade top 10 list depends on:

  1. Material Relevency
  2. How The Material is delivered (simplicity)

    I tried to give a mix between slide’s material and some topic I encountered during learning about this topic, this is done to keep a correlation between them.

    Top 10 List Week 07:

    1.Synchronization
    Synchronization which in this context is process synchronization, in short means to use the same system resource for processes such that there is consistant/ minimalizing inconsistent data.
    2.Proof of Peterson’s Solution
    For those of you who are looking for the proof of Peterson’s Algorithm, head to the link above.
    3.Critical Section
    Critical section simply put is a code segment where shared resource (variable) is accessed.
    4.Pthread
    Pthread or POSIX thread is a library to spawn concurrent flow, the link above for more detail.
    5.busy wait
    A process is waiting for a condition to be satisfiedin a tight loop without relinquishing the processor; or could wait by relinquishing the processor, and block on a condition and wait to be awakened at some appropriate time in the future.
    6.Deadlock & Starvation
    Simply put, deadlock is like a real life intersection deadlock, where a vehicle (process) doesn’t want to concede (holding resource) and wanting to pass (wait for resource). Starvation is when a process wait for a resource for a long time.
    TLDR, both are similar (waiting for resource) but for deadlock, the process is also holding resource.
    7.Semaphore
    Semaphore, which in this case is not the real life semaphore, is an integer variable used to only allow one process to enter a critical section. There are 2 important concept, wait and signal.Basically, when a process enter waits, it will wait until a certain signal is post from another program to continue. While post as it implies, post a signal for another program that is in wait to run.
    8.semaphore.h
    Semaphore used within this week assignment, more specifically POSIX Semaphore, is defined within the header semaphore.h. The link given above describes it pretty straightforward, for more in depth with more explanation, you can visit here.
    9.Mutex
    Also known as lock, is a program which enables thread to access the same resource; however, only one thread can access it at a time. An analogy to simply describe mutex is like changing room within a clothes store which everyone can use; when 1 people is using it, the door is locked and other people can’t enter.
    10.Monitor
    Simply put, it is a construct/object to have mutual exclusion and ability to wait until a certain condition
    More Resource: 1