0

I have been researching process scheduling as part of my studies. In doing so I have been referring to the following information:

According to Abraham Silberschatz, Greg Gagne, and Peter Baer Galvin in; "Operating System Concepts, Ninth Edition ", Chapter 3;

a process is in a ready state when:

The process has all the resources available that it needs to run, but the CPU is not currently working on this process's instructions.

However I have also been informed from lecture notes that:

When the short-term scheduler selects the next process [from the ready state and before using the CPU], the Dispatcher Routine gives it control of the CPU. Before the process can actually be dispatched it must go through a conflicts phase. (so far so good, however it goes on..)

"An aspect of this conflicts phase is the acquisition of resources needed by the new process to execute".

If the process is selected from a ready state by the dispatcher routine and the definition of the ready state is that "The process has all the resources available that it needs to run" then:

why is it necessary for 'An aspect of the conflicts phase to be the acquisition of resources'?

At what point exactly does a process acquire the necessary resources?

Thomas Flood
  • 81
  • 1
  • 3

1 Answers1

0

All of this is system dependent. First of all, to understand the procedure, there is a SCHEDULER. Some OS books talk about long, medium, and short-term schedulers but this division is system specific.

From a general perspective, a process has only three states: (1) running; (2) ready to run and (3) not ready to run. Every operating system on the planet is going to have more states that I have conflated to #3. However, those additional states are entirely system specific.

I find this definition confusing:

a process is in a ready state when:

The process has all the resources available that it needs to run, but the CPU is not currently working on this process's instructions.

The main resource a process needs to run is the CPU. Thus, if a process has all the resources it needs to run, it is running.

I also find confusing the use of the term "resources" to describe a waiting process. From a system neutral point of view, the only resources a process needs to run are (1) the CPU and (2) physical memory needed to execute the current instructions. Other than having these, processes normally are in a "not ready to run" state because they are waiting on events to occur; not resources to become available.

That is not so say some systems may have other resources needed to run, but this is system specific.

The problem that you face is that the description you are giving (or being given) is of a mishmashed description of theory and implementation. An operating system might not have a conflicts phase at all that you are describing. On the other hand some specific operating system might be implemented the way you are describing.

In short, people seem to be making the high level theory more complicated for you than necessary and you are getting a confusing dose of operating system specifics without regard to some specific operating system.

Community
  • 1
  • 1
user3344003
  • 20,574
  • 3
  • 26
  • 62