Question: Operating Systems Question (Please help if you can) 5. What is a trap? Give an example. How does it differ from an interrupt? 6. Why

Operating Systems Question (Please help if you can)

5. What is a trap? Give an example. How does it differ from an interrupt?

6. Why does the Linux kernel handle certain interrupts in two stages: top half and bottom

half?

7. What is a context switch? What is the role of the kernel in a context switch?

8. What is the maximum number of processes in the system at any time using the following

code segment?

extern char mypath[];

for ( int i = 0; i < 10; i++ )

{

pid_t pid, pid_out;

unsigned char status;

if ( pid = fork() )

pid_out = wait ( &status );

else

execl ( mypath, "child", "parameter", NULL );

}

Assume that child performs some simple computation and returns the result, that is captured

in status.

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!