Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Add a new system call called trace to xv 6 . Its syntax is int trace ( int ) When called with a non -
Add a new system call called trace to xv Its syntax is
int traceint
When called with a nonzero parameter, eg trace system call tracing is
turned on for that process. Each system call from that process will be printed to
the console in a userfriendly format showing:
the process ID
the process name
the system call number
the system call name
Any other processes will not have their system calls printed unless they also call
trace
Calling trace turns tracing off for that process. System calls will no longer be
printed to the console.
In all cases, the trace system call also returns the total number of system calls
that the process has made. Hence, you can write code such as:
printftotal system calls so far d
trace;
The system call counting for each system call on a perprocess basis. You will
need to keep track of this in the process control block, the proc structure.
Write a test program tryc to test your trace system call
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started