Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Operating System Concept : The following code segment is the part of the program. What are the succeeding 3 program counter, in term of line

Operating System Concept :

The following code segment is the part of the program.

What are the succeeding 3 program counter, in term of line number in this program, after the program executes the instructions on Line X?

When the system call is interrupted by a signal, will the system call be resumed after the signal is caught? If yes, please illustrate the procedure to resume. Otherwise, please describe how the operating system terminates the system call.

The A and B part in the above code segment can be separated into multiple processes or multiple threads. Please describe how the measured flow in A part can be sent to B part when multiple process and multiple thread are used.

#include #include #include #include

int main(int argc, char **argv){ void catch(int); int a; printf("Hello Taipei!! "); signal(SIGSEGV, catch); /* A part : measure the traffic flow */ a = *(int *) 0; // LINE X /* B part : change the traffic light */ }

void catch(int snum){ printf("Oooops, there is an illegal memory access(%d). ", snum); raise(SIGSTOP); exit(0); }

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

How might different countries cultures view performance appraisal?

Answered: 1 week ago

Question

3. What strategies might you use?

Answered: 1 week ago

Question

3. Write a policy statement to address these issues.

Answered: 1 week ago