1. The janus program can be used to trace a process and a log file giving some summary about the activities of the program. 
The log file contains information about 
a)The files execed by the program. 
b)The system calls made by the program and the their count and timings.
c)The time spent in open, close, read and write in various file systems.
d)The no. of page faults occurred.

2. The Analysis program can be used to analyse the log file and give a brief summary of what the program did. 


3. An idea on how to keep track of addresses in mmap call:
For keeping track of the addresses in mmap system call, you require a tree type of data structure where  the parent node has information about  the address range of its childrens. This is required beacuse of the properties of mmap system call. The mmap system call removes any previous mapping for that area of memory. So you might need to keep track of addresses whcih are implicitly unmapped by mmap. You might have mapped this area before. You also need to keep track of "munmap" system call. This will help you in finding whether a particular page fault that occured is for an address that has been mmaped. 


4. An idea on how to find the time spent in a page fault:
The reason to have a roundabout method for doing this is that unlike a system call entry and exit hook, we have only an entry hook. So you cannot find the amount of time spent by simply taking the difference.
A trick is to change the instruction which caused the page fault to occur and replace it with an illegal instruction. This will cause an illegal instruction fault to occur, which can be hooked and then the time difference between the occurrence of the page fault and that of an illegal instruction can be found and this is approximately the time required for a page fault recovery. You can then restore the original instruction that was replaced before starting the program again.


5. An idea on keeping track of I/O limited by human thinking:
If you see the analysed files, you would realise that most of the time is spent in "proc" or "unknown" file systems. A clear picture regarding the time spent is not obtained. It is necessary to differentiate the time spent by a program when it is waiting for an input from a human being (ie. mouse, keyboard etc.) then the time spent in doing other I/O(ie. disk, network etc.).
A state m/c can be maintained that keeps track of the I/O related activities of the program. Initially the "stdin" is the input file descriptor and we can trak of that. We can keep track of the files that are opened by finding the device associated with it. It can be a keyboard, network, mouse etc. If the throughput of I/O reaches a certain level than we can say that the I/O is definitely not due to a human being.  
 

6. Multithreading the program:
At present janus forks a child to trace every process. On some systems, which limit the no. of processes that can be run by a user, this causes some serious problems. 
The way to solve this problem is to make the program multithreaded. This can however make the program complex, as multithreaded programs are difficult to debug.