MCQ Tutorial Search
Home Search Add Question Today's History Discussion Board Job Portal Linux Linux Basics File and Folder
Environment Command

Process

Memory Shell Programming Mock Test Contact Feedback
Home
Search
Add Question
Today's History
Discussion Board
Job Portal
Linux
Linux Basics
File and Folder
Environment
Command

Process

Memory
Shell Programming
Mock Test
Subscribe/Unsubscribe
Email:
Social Media
Facebook

Misc Tutorials

References

Question and Answer Tutorial
Tutorials Point
Stack Overflow

MCQ Tutorial - Linux->Process

First Previous 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Next Last
121.) Semaphore P() operation usually does the following:
Options are:
A.) Descrements the semaphore count and the process sleeps if needed
B.) None of the mentioned options
C.) Increments the semaphore count
D.) Wakes up a sleeping process
                        
122.) What is the output of the below code?

    void sig_handler ( int signum) {
        printf("Handled the signal\n");
    }

    int main() {
        int pid;
        signal (SIGKILL, sig_handler);
        pid = fork();
        if (pid==0) {
            kill(getppid(), SIGKILL);
            exit(0);
        } else {
            sleep(20);
        }
        return 0;
    }
Options are:
A.) Parent goes to the signal handler, prints handled the signal and goes back to sleep
B.) Error child cannot send a SIGKILL signal to parent.
C.) Parent exits without going to the signal handler
D.) Parent goes to the signal handler, prints handled the signal and exits
123.) If a signal is received by a process, when will it be processed?
Options are:
A.) None of the mentioned options
B.) It is processed when process is switching to kernel mode
C.) It is processed immediately
D.) It is processsed in the next timeslice given to the process
                        
First Previous 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Next Last
Comment:
Name:Email:
Contact No.:
Copyright © 2014 by SBJ Group. All Rights Reserved. Developed and maintained by SBJ Group. Supported on Internet Explorer browser only