OS Organization: Mid-term questions -Short Answer Questions

  1. (16) Briefly explain why a 5 state model is not sufficient for describing processes in modern OSes.
    The 5 state model lacks the idea of suspending processes. Modern OSes suspend processes (move data to disk) to increase processor utilization and use main memory more efficiently.  So, the 5 state model is not sufficient.
  2. (17) What are the major differences between kernel-supported threads and user-level threads
    • User level threads are faster to create and manage.
    • User level thread implementation is by a thread library at the user level, while in kernel level thread OS supports creation of Kernel threads.
    • UTL is generic and can run on any OS, while KLT is specific to the OS.
    • UTL multi-threaded apps cannot take advantage of multiprocessing, while Kernel routines themselves can be multi-threaded.
  3. (18) Briefly compare and contrast the methods for handling multiple interrupts. Give advantages and disadvantages of each.
    • (1) Sequential Method: handles the interrupts on a first come first serve basis; every interrupt will get handled but interrupts  w/ a higher priority or greater urgency will have to wait their turn.
    • (2) Nesting Method: handles the interrupts  via a priority scheme so a higher priority interrupt can interrupt can interrupt one w/ a lower priority. It may be possible that a lower priority interrupt never gets handled.
  4. (19) How can a kernel obtain the advantages of both User level Threads (ULTs) and Kernel Level Threads (KLTs) without incurring many of the disadvantages of both.
    By implementing a combined approach that takes advantage of  both the ULTs and KLTs advantages, while avoiding their disadvantages. Solaris is an example of an OS that uses this approach.
  5. (20) Write a segment of code which crease two new processes connected by a pipe as follows:
    1) the first one will execute the program "home/go/bin/doit.exe" which writes its output to standard out.
    2) the second one will execute the program "home/go/bin/makeit.exe" which reads its input from standard in.
    Be sure to create a pipe connecting the two processes together so that the output of the first is connected to the input of the second.
  6. Image Upload 2
  7. (21) Write a segment of code which uses the sigaction() sys call to set up the function handleall() as the signal handler for every signal in the system, where all signals are numbered from 1 to n, contiguously. You do not have to worry about SIGKILL and SIGSTOP which cannot be caught. You do NOT have to implement the function handleall(). Function handleall() has the following prototype:

    void
    handleall(int i)
    Image Upload 4
Author
geschw66
ID
319928
Card Set
OS Organization: Mid-term questions -Short Answer Questions
Description
Midterm Answers for CSE 422s 2016 at WUSTL
Updated