logo

Crowdly

Browser

Add to Chrome

Questions Bank (1440495 total)

Select the sequence of events that are NOT possible, assuming a non-interruptible kernel code

(Note: non-interruptible kernel code means, if the kernel code is executing, then interrupts will be disabled).

Note: A possible sequence may have some missing steps in between. An impossible sequence will will have n and n+1th steps such that n+1th step can not follow n'th step.

0%
0%
0%
0%
0%
0%
View this question

Select all the correct statements about the process init on Linuxes/Unixes.

0%
0%
0%
0%
0%
0%
0%
View this question

Write the possible contents of the file /tmp/xyz after this program.

In the answer if you want to mention any non-text character, then write \0  For example abc\0\0 means abc followed by any two non-text characters

int main(int argc, char *argv[]) {

    int fd1, fd2, n, i;

    char buf[128];

    fd1 = open("/tmp/xyz", O_WRONLY | O_CREAT, S_IRUSR|S_IWUSR);

    write(fd1, "hello", 5);

    fd2 = open("/tmp/xyz", O_WRONLY, S_IRUSR|S_IWUSR);

    write(fd2, "bye", 3);

    close(fd1);

    close(fd2);

    return 0;

}

View this question

When you turn your computer ON, on BIOS based systems, you are often shown an option like "Press F9 for boot options". What does this mean?

0%
0%
0%
0%
View this question

What will this program do?

int main() {

fork();

execl("/bin/ls", "/bin/ls", NULL);

printf("hello");

}

0%
0%
0%
0%
0%
View this question

Select all the correct statements about bootloader.

Every wrong selection will deduct marks proportional to 1/n where n is total wrong choices in the question.

You will get minimum a zero.

0%
0%
0%
0%
0%
View this question

Select all statements that correctly explain the use/purpose of system calls.

0%
0%
0%
0%
0%
0%
0%
View this question

Predict the output of the program given here.

Assume that all the path names for the programs are correct. For example "/usr/bin/echo" will actually run echo command.

Assume that there is no mixing of printf output on screen if two of them run concurrently.

In the answer replace a new line by a single space.

For example::

good

output

should be written as good output

--

main() {

    int i;

    i = fork();

    if(i == 0)

        execl("/usr/bin/echo", "/usr/bin/echo", "hi", 0);

    else

        wait(0);

    fork();

    execl("/usr/bin/echo", "/usr/bin/echo", "one", 0);

}

View this question
Compare multiprogramming with multitasking
0%
0%
View this question
View this question