OPERATING SYSTEMS 3] Install Linux on a virtual machine (VirtualBox) in your sys
ID: 3779619 • Letter: O
Question
OPERATING SYSTEMS
3] Install Linux on a virtual machine (VirtualBox) in your system according to the guidelines from earlier in the semester. Include screen shots showing your name as a VM name and as the base directory for your homework in the homework document described at the end of these instructions. Note: if you already had a Linux box at your disposal, you can use that machine.
[3] Create and run a program (fork.c) that generates two child processes for every request by calling fork() function. Show the screen capture that you test.
Each child process runs at least 10 seconds to handle a request.
Please show screen capture where a parent process and at least two child processes are running (use “ps –ef | grep ”)
Should use “make” to compile and link. Create a “Makefile”.
Explanation / Answer
Here's a code to create 2 child process and keeping them alive for 10 seconds simultaneously.
makefile =>
all: fork.c
gcc -o fork fork.c
clean:
rm fork
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.