Three distinct types of events that allows OS to get back CPU
from the current user process is (1) system calls, (2) hardware
interrupts, and (3) CPU traps (such as segmentation faults). Which
of these events may occur upon executing each line of the following
code? Mark appropriate blanks with X. For example, when main( ) is
called, this program gets started with the execlp system call. When
main( ) returns 0, the exit system call is invoked implicitly.
Don’t fill out any shaded blanks. Note that some statements may not
cause any events or the others may cause multiple events.
System calls Interrupts Traps X #include <iostream> // cout using namespace std; void func( int numberi, int number2 ) { cout << number1 + number2 << endl; } int main( void ) { int *array = new int[100]; cin >> array[O]; // 321 is typed from the keyboard. *(array + 99) 123; func( array[O], array[99] ); *(array 10000) = 456; return 0; } = X
Three distinct types of events that allows OS to get back CPU from the current user process is (1) system calls, (2) har
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Three distinct types of events that allows OS to get back CPU from the current user process is (1) system calls, (2) har
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!