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() ?
The fork() function returns:
When the shell has to execute a command "ls -l -h", the call to exec() can be:
when you type "ls" in the shell, what happens if you don't call waitpid() before looping and printing the prompt ?
When you create a pipe p
In the main loop of a shell, you have generally:
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); }
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!