Srping 2010

Clay Shields


front | classes | research | personal | contact

Homework 1 - Examining process state in Unix

Due before class January 27th, 2010.
This semester we will be doing several projects on a Unix system. If you have used Unix before, then some of this material will be new. Some it will not be.

You will be given an account on the machine named spoof.cs.georegtown.edu. Your login information is what you provided in class. The first time you log in, you will immediately be prompted to provide a new password. This password must be at least 6 characters in length, and have at least 2 letters and 2 numbers.

For this assignment, you are to use your own Unix account on spoof. Other machines may not have the commands installed for you to use.

If you need to access spoof from home, use SSH. A free SSH client (for Windows) is available here. Mac OS X has SSH installed as a command by default and can be reached through the terminal application. Linux users sneer at Mac and Windows users for not already knowing about SSH.

You will quickly notice that Unix has a command line interface. You will have to type commands you want executed. This is good and bad. You have more control over what happens, but you have a lot to learn instead of having someone else choose all possible options for you.

First Off

You can get what passes for help for any command on a Unix system by typing:

man <command>

where <command> is the command you want information about. The man pages are not always useful in a tutorial sense, but they will explain the variety of options available for each command.

Try "man man" to see what man can tell you.

Unix reference information

A number of good tutorials exist that will teach you all you need to know about Unix, and more. You should look through these tutorials as you answer the questions below.
Tutorials and Guides
http://8help.osu.edu/wks/basic_unix_guide/ http://www.ee.surrey.ac.uk/Teaching/unix/
http://heather.cs.ucdavis.edu/~matloff/unix.html


Intro to unix
http://wks.uts.ohio-state.edu/unix_course/unix_book.pdf

Intro to System Administration (more in-depth)
http://8help.osu.edu/wks/sysadm_course/

Your assignment:

Use the man pages and the tutorials referenced above (other on-line sources are fine too, but talk to me before you talk to others about the assignment) to figure out how to do the following things on a unix system.

Process Management and Information

Commands to learn:

top, ps, nice, nohup, kill, signal

1) What command can you use to show all the processes that you are running?

2) What is the process ID of the shell you are currently using?

3) What command can you use to show all the processes that are running on the system?

4) What command can you use to see the top few most active processes on a system?

5) How could you cause a command to run with a lower priority than it otherwise would?

6) What command can you use to send signals to running processes?

7) Describe 5 different types of signals you can send, and their likely effects. Commands to learn:

Run each of these commands on the process ID of your current shell (from question 2). For each question, indicate which command you used.

pflags, pcred, pmap, pldd, psig, pstack, pfiles, pwdx, ptree

(you will need to be on a SunOS machine, such as spoof, to use these)

8) What is the address of the stack of your shell process?

9) What is the root of the process tree of your shell process?

10) What is the working directory of your shell process?

11) What is the user id that your shell is running with?

12) What files does your shell have open?

13) What shared libraries is your shell using?

14) What will your shell process do to process each possible signal it can receive?

15) What does the stack of your shell process look like?

Commands to learn:

apptrace, truss

(you will need to be on a SunOS machine, such as spoof, to use these too)

16) What shared library calls does the command ls make?

17) What system calls does the command ls make?

Machine and Architecture Information

Commands to learn:

arch, uname, pagesize, iostat, vmstat, mpstat, busstat, kstat

18) What is the kernel architecture of spoof?

19) How large are the memory pages on spoof?

20) What percentage of the time has the CPU on spoof been idle?

21) What type of interrupt is most common on spoof?


What to turn in:

You should submit the answers to this assignment on paper in class.