Assignment 1

1. In a c program, print the address of a variable and enter into a long loop.
Start 3/4 processes of the same program and observe the printed address values.
Try the experiment on differnt architectures/OSs.
Are the addresses same?

2. Learn the top command to display resource utilization statistics of processes.
In one window, start the top command
Now start a browser and see the effect in the 'top' display.
compile a program and observe the effect.
How much memory is free in the system?
Which process is taking the most of the cpu?
Which process has got maximum memory share?

3. Use strace to find out system call traces of an executing process.
Find out a command on a shell such that the command does not make a system call.
Use strace to locate such a command.
strace bash to observe how bash uses system calls to read commands from the console and echoed back to screen.