Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Recognize the power of service guarantees.

Answered: 1 week ago

Question

Demonstrate how to use the Gaps Model for diagnosing and

Answered: 1 week ago