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
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