0% found this document useful (0 votes)
16 views1 page

Lab Manual 2: Operating System

This lab manual describes adding a system call to the xv6 kernel that returns the number of system calls made since boot. Students are asked to implement a getsyscallinfo() system call that returns an incremented counter value each time a system call is executed. The counter tracks the total number of system calls and is incremented before each call finishes, not after, then returned to the calling program.

Uploaded by

abdullah4ejaz-2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Lab Manual 2: Operating System

This lab manual describes adding a system call to the xv6 kernel that returns the number of system calls made since boot. Students are asked to implement a getsyscallinfo() system call that returns an incremented counter value each time a system call is executed. The counter tracks the total number of system calls and is incremented before each call finishes, not after, then returned to the calling program.

Uploaded by

abdullah4ejaz-2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Lab Manual 2 Operating System

This lab is about xv6 which is little and beautiful kernel perfect for study and usage. The goal of
the project is to add a system call to xv6. The system call that you will made should look
something like this:

int getsyscallinfo(void)

It simply returns the value of a counter.

Specifically, you need to add one counter that increments every time a system call is made. The
counter should be incremented before each time a system call is issued; when getsyscallinfo() is
called, the calling program can thus discover how many total system calls have been made.

Your system call returns the number of calls made since the system booted on success, and -1 on
failure.

The count for a system call should only be incremented before the call is finished executing, not
after.

Prepared by: Sana


1

You might also like