Question: Operating Systems OS161 C Systems Programming Implement a simplified system call void _exit(int exitCode) In OS161, you can end user programs by calling the _exit(

Operating Systems

OS161

C Systems Programming

Implement a simplified system call void _exit(int exitCode)

In OS161, you can end user programs by calling the _exit( ) system call. Without an implementation of _exit( ), the threads created to handle user programs will hang around forever, executing an infinite loop in the user space and taking up a lot of CPU time.(HINT: You should use thread_exit() that is almost an idealhandler for the _exit( ) system call then modify that function to receive the exitCode as a parameter (you will also have to modify all the other uses of that function in order to pass the exitCode). In this part, you have to print out the exitCode thatis passed. Once you implement the _exit() system call, you will find that useful for the next part to prevent infinite loop.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!