Consider the following C code:
How many child processes are created upon execution of this program? Justify your
answer and do not just provide a number. Run the code on your computer an
Week 1 DQ
What is the difference between Kernel and User Mode? How does the dual mode
approach (Kernel and User) Impact the design of an operating system.
The dual mode (Kernel & User Mode) approach in Operating System design is great for
What does the following shell pipeline do?
grep nd xyz | wc l
Write an alternative command (or commands) that can accomplish the same thing and explain
which alternative is better and why.
The grep part lets you search file(s) fo
Five Features of an operating system:
Scheduling this is how your OS handles active processes and how they use the CPU processing
Memory Management - The OS makes sure applications run smoothly wit
/creates a macro, which is the association of an identifier or peramiterized
#define NUM 10
/This defines the semaphore
void* thread_f(void* par)cfw_
Consider the following code for a process P0 (assume turn has been initialized to zero):
- Etc. -while (turn != 0) cfw_
Critical Section /* */
turn = 0;
- Etc. -For process P1, the code is:
- Etc. -while (turn != 1) cfw_
A computer has 4GB of RAM and its OS uses 512MB. All processes need 256MB. If the goal
is 99% CPU utilization, what is the maximum I/O that can be tolerated? Explain your
calculations in detail.
Therefore, if we have 4GB, which