Meng Yi Yee
CS 431
Sep 15, 1999
Homework 1

 

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. Result: MS Dos window opened
  3. Use the hostname command to find the name of the computer you are using.
  4. Result: 350gw16
  5. Use winmsd.exe to determine the following:
  • Result: Windows NT Diagnostics window opened
      1. Which version of NT are you using?
      2. Result: Version 4.0 (Build 1381: Service Pack 5)
      3. What is the type and speed of the CPU in your machine?
      4. Result: x86 Family 6 Model 5 Stepping 1 GenuineIntel ~348 Mhz
      5. How much space is formatted into your c: drive?
      6. Result: 1,069,253,632 Bytes
      7. How much space is used on your c: drive?
      8. Result: 552,804,352 Bytes
      9. How much physical memory is configured into your machine?
      10. Result: 130,468 K
      11. How much of the memory is used by the kernel?
      12. Result: 2,824 K
      13. How many services are running?
  • Result: 33
    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.
  • Result: Performance Monitor window opened
      1. What do each of these plots represents?
      2. Result:

        Interrupts/second is the percentage of elapsed time that the Processor spent handling hardware Interrupts

        Privileged time is the percentage of processor time spent in Privileged Mode in non-Idle threads

        Processor time is expressed as a percentage of the elapsed time that a processor is busy executing a non-Idle thread

        User time is the percentage of processor time spent in User Mode in non-Idle threads

      3. 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?
      4. Result: I had the highest result for interrupts/second when I moved the mouse in a circle very quickly.
      5. 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?
      6. Result: I had the highest result for privileged time when I used the mouse to click the program's buttons on the the task bar
      7. 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?
  • Result: I had the highest result for process time when I used the keyboard to type in MS Word
  •  

    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.)

    Result: Process Viewer window opened

      1. How many processes are running?
      2. Result: 30
      3. What is the idle process?
      4. Result: The idle process is created to run whenever nothing else is running. It has only a single thread and is present on every NT system.
      5. What fraction of the time does the idle process spend in Privileged and User time?
      6. Result: Privileged time = 100%

        User time = 0%

      7. What is the base priority class of the idle process?
      8. Result: Idle
      9. What is the priority class of the thread running in the idle process?
      10. Result: Normal
      11. What is the dynamic priority of the idle thread in the idle process?
      12. Result: 0
      13. What is the PVIEW process?
      14.  
      15. What is the base priority class of the PVIEW process?
      16. Result: Normal
      17. How many threads are running in the PVIEW process?
      18. Result: 2
      19. What is the priority class of the thread running in the PVIEW process?
      20. Result: Normal
      21. What is the dynamic priority of each of the threads in the PVIEW process?
      22. Result: 15
      23. Does any process have more than 2 threads running? (If so, which ones?)
  • Result: Yes, amgrsrvc, CSRSS, EXPLORER, LSASS, NTVDM, oscmgr4, osserver, PSTORES, RPCSS, SERVICES, SMSS, SNMP, SPOOLSS, System, VsTskMgr, and WINWORD
    1. Start the Task Manager by pressing Ctrl-Shift-Esc.
      1. What applications are currently running?
      2. Result: Windows NT Task Manager, Process Viewer, Performance Monitor, MS-DOS, and MS Word.
      3. 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?
      4. Result: The integer number of PID is exactly equal to hexadecimal number in Process Viewer display for the same process shown in both Process Viewer and Processes of Windows NT Task Manager.
      5. Look at the "Performance" display. Which plot on the Performance Monitor is the same as the "CPU Usage History" curve in the Task Manager?
      6. Result: Process time
      7. Is there any plot on the Performance Monitor that provides the same information as the "Memory Usage History" plot in the Task Manager?
      8. Result: None
      9. How many handles are currently open in the entire system?
      10. Result: 2078
      11. How is this correlated to the number of Executive objects in the system?
      12. Result: The total number of handles show the total number of threads that are currently executing, and the total number of processes that exist. The number of executive objects reflect the total number of handles
      13. How many threads exist in the system?
      14. Result: 160
      15. How many processes exist in the system?
  • Result: 30
    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. Result: 3
      3. What is the effect of the threads on the CPU Usage?
      4. Result: CPU Usage increased
      5. Is the CPU load primarily privileged or user computing?
      6. Result: User
      7. What is the range of dynamic priorities under which the CPULOAD threads run?
  • Result: 9-10
  •  

    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. Result: dummyin2.txt
      3. What tools can you use to quantify their use of the resources?
      4. Result: Use notepad to see dummyin2.txt and dummyout2.txt
      5. What measure of usage can you supply?
  • Result: Privileged time is always higher than user time, Dynamic Priority is 9-10, Thread Priority is Normal, and Base Priority is Normal.