1.
Summarize Process state diagram
2. Define process and thread
   A process, in the simplest terms, is an executing program. One or more threads run in the
   context of the process.
   A thread is a single sequence stream within a process thread are also called as light weight
   process
3. Draw diagram of different thread models
                                                     User lavel thread
        User ara
                                        Thread Library
          Kernal level thraed
                                process
4. Why page replacement is needed
   Page replacement algorithms are an important part of virtual memory management and it helps
   the OS to decide which memory page can be moved out, making space for the currently needed
   page. The ultimate objective of all page replacement algorithms is to reduce the number of the
   page faults.
5. Summarize necessary four condition for deadlock
      1. Mutual Exclusion : two or more resources are non shareable only one process can be
         used at a time
      2. Hold and wait : a process is holdind atleast once resources and waiting for another
         process
      3. No preemption : a resources cannot be taken from a process unless the process release
         the resources
      4. Circuler wait : a set of process are waiting for each other to circuler form
6. Comparison among scheduler
   A Long-Term Scheduler helps in controlling the overall degree of multiprogramming.
   -It is almost absent or minimal in time sharing sysytem
   The Short-Term Scheduler provides much less control over the degree of
   multiprogramming.
   - it also minimal in time sharing system
   Medium-Term reduces the overall degree of multiprogramming. Selects processes from the
   pool and then loads them into the memory for execution.
   - It’s a part of time sharing system
7. A
8. Process       AT         BT        CT       TT          WT
   P1             0         6          19       19         12
   P2             1         4          13       12         7
   P3             2         2          6        4          1
   P4             3         1          4         1         0
   P5             4         2          9         5          3
   P6             5         1          7         2          1
     P1          P2        P3         P4         P5       P6        P5        P2      P1
    0        1         2          3          4        6         7         9         13 19
   Turn around avg = total /no. of process