Question

In 5-8 sentences typed 1) What are I/O-bound and CPU-bound processes? Describe their behavior as it...

In 5-8 sentences typed

1) What are I/O-bound and CPU-bound processes? Describe their behavior as it relates to CPU scheduling.

2) What is a context switch? How does it affect process scheduling?

3) Describe the creation of new processes using the fork() and execv() commands. Include the waitpid() function in your discussion.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1) I/O bound processes are ones that deal with Input-Output and CPU bound processes are those which deal with using the processor. Generally, no process is pure CPU bound or pure I/O bound, most processes are a combination of both.

2) A CPU can run only one process at a time. To give the impression of multiprocessing, the CPU rapidly switches between processes so that all of them can be handled simultaneously, well,sort of. This is called context switching. There are many algorithms around which process should get a chance to run on the CPU , and according to those algorithms the next processes that gets to run on the CPU is decided.

3) Fork is used to create a copy of the fork-ed process. The newly created process is a replica of the parent process and has a new processId. It has the process ID of the process that forked it as its parent process ID (ppid). The fork function for the child returns 0 whereas the fork function of the parent returns the process ID of the child.

Exec however is used to replace the current process with a new process.

The parent waits for the child while it is processing.

Add a comment
Know the answer?
Add Answer to:
In 5-8 sentences typed 1) What are I/O-bound and CPU-bound processes? Describe their behavior as it...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT