Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 In the following program, the number of messages with BBB is _______. int main() { pid_t pid = fork(); /* 1. fork a

Question 1

In the following program, the number of messages with "BBB" is _______.

int main() { pid_t pid = fork(); /* 1. fork a child process */ printf ("AAA, pid=%d. ", pid); // print out AAA pid = fork(); /* 2. fork another child process */ printf ("BBB, pid=%d. ", pid); // print out BBB pid = fork(); /* 3. and fork another */ printf ("CCC, pid=%d. ", pid); // print out CCC return 0; }

Question 2

In the round robin scheduling, the average turnaround time can be improved, in general, if time quantum is larger. For example, we are given three processes of 5 time units each.

With a quantum of 1 time unit, the average turnaround time is x.

x = ?

With a quantum of 2 time units, the average turnaround time is y.

y= ?

If the time quantum is 13 the average turnaround time drops to z.

z = ?

Question 3

When memory is not enough, processes in ______ states are preferred to be swapped out first.

When memory is sufficient, processes in _______ states are preferred to be swapped in first.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Performance Indexing In SQL Server

Authors: Jason Strate, Grant Fritchey

2nd Edition

1484211189, 9781484211182

More Books

Students also viewed these Databases questions