Search for question
Question

1 Part-1 Getting process statistics and modifying system call in xv6-300

points

As a part of this assignment, we will go deeper into understanding system calls in xv6. First, we will start

by extending the current system proc structure and adding a few fields to understand the process life-cycle

better. We will add three main fields: The first is the creation time; whenever a process gets created, we

want our kernel code to update the process creation time. Similarly, the second is the end time, which

provides information when the process gets terminated or finishes its job, and the final field provides the

total time. Call your newly formed system_call in user-space. To do so, you will create a test.c script,

that calls your two previously built functions uniq and head function in user-space. Your new system call

should provide, provide all the requested information (creation_time, end_time, total_time) for these two

processes (uniq and head). (Hint: You need to understand how ticks work in xv6 and have to extend the

wait system call)

2 Implementing ps on xv6 - 300 points

Once part 1 is complete, you must create a ps command in xv6, which provides information about the

process. In your custom ps, you will display PID number, process status (running, zombie, wait etc),

start_time, total time, and process_name.

Fig: 1