CS431 Introduction to Operating Systems

Exercise #1

This exercise is taken directly from the Nutt Lab Manual.  You may use any machine that is currently running Windows NT Workstation.  Be sure to identify the machine characteristics, as specified below.
  1. Be sure that all windows are closed except the one in which you are reading and editing this document. Start a window running cmd.exe.
  2. Use the hostname command to find the name of the computer you are using.
  3. Use winmsd.exe to determine the following:
    1. Which version of NT are you using?
    2. What is the type and speed of the CPU in your machine?
    3. How much space is formatted into your c: drive?
    4. How much space is used on your c: drive?
    5. How much physical memory is configured into your machine?
    6. How much of the memory is used by the kernel?
    7. How many services are running?
  1. Terminate winmsd.exe, then start perfmon.exe ("Performance Monitor") Select "Add to Chart" from the "Edit" menu. Add counters for interrupts/second, privileged time, processor time, and user time (all from the "Object: Processor" counter set). Leave this tool running until you have finished answering question 6.
    1. What do each of these plots represents?
    2. What operations can you perform using cmd.exe, the mouse, and/or the keyboard to make the number of interrupts/second be as large as possible?
    3. What operations can you perform using cmd.exe, the mouse, and/or the keyboard to make the amount of privileged time be as large as possible?
    4. What operations can you perform using cmd.exe, the mouse, and/or the keyboard to make the amount of processor time be as large as possible?
  1. The VC++ package contains a program named pview.exe ("Process Viewer") – it will be stored in a path similar to (but perhaps slightly different from)
  • C:\Program Files\DevStudio\VC\bin\winnt\pview.exe

    Notice that this is a static display of information, meaning that when the tool starts, it determines the data it will show, then not change the display. The display can be updated to show newer data by using the "Refresh" button. (Leave this tool running until you have finished answering question 6.)

      1. How many processes are running?
      2. What is the idle process?
      3. What fraction of the time does the idle process spend in Privileged and User time?
      4. What is the base priority class of the idle process?
      5. What is the priority class of the thread running in the idle process?
      6. What is the dynamic priority of the idle thread in the idle process?
      7. What is the PVIEW process?
      8. What is the base priority class of the PVIEW process?
      9. How many threads are running in the PVIEW process?
      10. What is the priority class of the thread running in the PVIEW process?
      11. What is the dynamic priority of each of the threads in the PVIEW process?
      12. Does any process have more than 2 threads running? (If so, which ones?)
    1. Start the Task Manager by pressing Ctrl-Shift-Esc.
      1. What applications are currently running?
      2. Look at the "Process" display. The PID field is the process’s internal identifier; what is the correlation between a process’s PID and the parenthesized hexadecimal number in the Process Viewer (PVIEW) display?
      3. Look at the "Performance" display. Which plot on the Performance Monitor is the same as the "CPU Usage History" curve in the Task Manager?
      4. Is there any plot on the Performance Monitor that provides the same information as the "Memory Usage History" plot in the Task Manager?
      5. How many handles are currently open in the entire system?
      6. How is this correlated to the number of Executive objects in the system?
      7. How many threads exist in the system?
      8. How many processes exist in the system?
    1. Close the Task Manager, Performance Monitor, and Process Viewer. Run the program in
  • ...\Exercise 1\Programs\CPULOAD.EXE <N> <RUN_TIME>

    This is a synthetic program that creates a process with "N" threads that will run for "RUN_TIME" seconds, then halt. Run the program with N = 3 for any run time you choose (perhaps a couple of minutes).

      1. How many threads are running in the process? If it is not the same as N, why not?
      2. What is the effect of the threads on the CPU Usage?
      3. Is the CPU load primarily privileged or user computing?
      4. What is the range of dynamic priorities under which the CPULOAD threads run?
    1. Run the program in
  • ...\Exercise 1\Programs\DISKLOAD.EXE <N> <RUN_TIME>

    This is a synthetic program that creates a process with "N" threads that will run for "RUN_TIME" seconds, then halt. Run the program with N = 3 for any run time you choose (perhaps a couple of minutes).

      1. What resources is this process and its threads using most heavily?
      2. What tools can you use to quantify their use of the resources?
      3. What measure of usage can you supply?