logo

Crowdly

Operating systems (2024-2025)

Looking for Operating systems (2024-2025) test answers and solutions? Browse our comprehensive collection of verified answers for Operating systems (2024-2025) at moodle.usth.edu.vn.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

when you type "ls" in the shell, what happens if you don't call fork() before execvp() ?

100%
0%
0%
0%
View this question

The fork() function returns:

0%
0%
0%
0%
View this question

When the shell has to execute a command "ls -l -h", the call to exec() can be:

0%
100%
0%
0%
View this question

when you type "ls" in the shell, what happens if you don't call waitpid() before looping and printing the prompt ?

0%
0%
100%
0%
View this question

When you create a pipe p

0%
0%
100%
0%
View this question

In the main loop of a shell, you have generally:

0%
0%
0%
100%
View this question

In the following code, we want data from A to be redirected to B. What should be the xxx and yyy parameters ?

    pipe(p); pid = fork();

    if (pid == 0) { dup2(xxx); close(p[0]); close(p[1]); execlp("B", "B", NULL); }

    else { dup2(yyy); close(p[0]); close(p[1]); execlp("A", "A", NULL); }

100%
0%
100%
0%
View this question

Want instant access to all verified answers on moodle.usth.edu.vn?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!