Updated: 11/4/97 1. Experiment with different options to the 'ps' command and read the 'ps' manual. Explain what the following outputs from 'ps' mean: F S UID PID PPID C PRI NI P SZ:RSS STIME WCHAN TTY TIME CMD 2. Read about the 'npri' and 'schedctl' commands. Explain the following: deadline scheduling non-degrading priority time slice 3. Read about the 'prctl' command. Explain what the following do: PR_MAXPROCS PR_MAXPPROCS PR_SETSTACKSIZE PR_GETSTACKSIZE Be brave and write a program using prctl with the above flags. 4. Use the 'top' command and read about the 'top' program. Explain: user pid pgrp %cpu proc pri size rss time command Try to run a process so that 'top' displays that the process is using batch priority (b). Can you get a process to use periodic deadline scheduling (d)? 5. Compile and run any program you have using the 'time' command: /bin/time program (e.g. /bin/time sleep 2) Explain what the three different (user, real and sys) time values mean. 6. Finally sit back and relax with 'gr_osview -a'. What do all the pretty coloured bars display? Read the 'gr_osview' manual and find out what the CPU Usage and CPU Wait are measuring, that is, what do the following mean: user sys intr gfxf gfxc idle io swap pio Refer to the INTERPRETING THE DISPLAY section of the manual and read the sections discussing: cpu wait sysact gfx intr Fascinating isn't it? Now display all those CPU processing activity bars as follows: $ echo "cpu\nsysact\nwait\ngfx\nintr" | gr_osview -D - and comment on what is happening. Does it all make sense? 7. Now try 'osview' and keep an eye on the CPU Usage, Wait Ratio, System Activity, and Scheduler values. Read the 'osview' manual to learn how to activate hidden displays (those marked with an *). 8. Come back at night or early morning when you are the only one logged into the workstation (to check to see who is on type 'who'). Now start top (or gr_top) and gr_osview (as described in 6.). Write simple C programs that either: chew up CPU (infinite tight loop) block (i.e. call sleep) chew up I/O (do a lot of fread() and fwrite()) Explain the behaviour of top and gr_osview. When you run your I/O intensive program does gr_osview tell you what I/O device you are using (hint: your home account comes from the network not the local hard disk!)? Modify your program so it uses the local hard disk.