

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


1. (3 pts.) What is the difference between a Program and a Process? 1. (3 pts.) What is a Program? 1. (3 pts.) What is a Process? 1. (3 pts.) Draw and label a state diagram showing the various Process States. 1. (3 pts.) Name three different Queues that a process may be in. 1. (3 pts.) Give four steps (in order) for creating a job. 1. (3 pts.) What does the fork() command do? 1. (10 pts.) Give the output of the program below: #include <sys/types.h> #include <unistd.h> #include <stdio.h> main() { int i=0, j=0; i++; if (fork()) { i=i+4; j++; prinf(“The value of j is %d\n”, j); } else { i++; } printf(“The value of i is %d\n”, i); } 1. (3 pts.) What does the join() command do? 1. (3 pts.) What is a Process Control Block? What is it used for? 1. (3 pts.) Name four different things generally found in a Process Control Block. 1. (3 pts.) Name two ways (conditions under which) a process may be terminated.
1. (3 pts.) What is cascading termination? 1. (3 pts.) How is a thread different from a process? 1. (3 pts.) Describe the three types of scheduling, short -, medium -, and long-term. 1. (3 pts.) Name three occasions when an operating system should swap out a process. 1. (3 pts.) Name three occasions when an operating system should swap in a process. 1. (3 pts.) What processes should be swapped out? (Name three types.) 1. (3 pts.) What does thrashing refer to?. 1. (3 pts.) About how often should short-term scheduling take place? 1. (3 pts.) When should we switch processes in short-term scheduling? (Name three different times.)