The following statement transition table is a simplified models of process management (see Figure 3.9b in the textbook, slide 25 in Lecture 3), with the labels representing transitions between READ, RUN, and BLOCKED
From\To | Ready | Run | Blocked |
---|---|---|---|
Ready | - | 2 | 3 |
Run | 1 | - | - |
Ready | - | 2 | - |
Give an example of an event that can cause each of the above transitions. Draw a diagram if that helps
Figure 3.9b contains seven states. In principles, one could draw a transition between any two states, for a total of 42 different transitions.
You have executed the following C program:
main() {
int pid;
pid = fork();
printf("%d \n", pid);
}
What are the possible outputs, assuming the fork succeeded?