Sunday, March 10, 2013

Can't it be changed

In a normal operating system we can see a process state diagram as follow.
in this algorithm i have seen a special scenario which i want to express as a drawback. After we activated the Process in a situation it needs some user input or an out put of a another process as a input it needs to wait on the" wait state" mean while other processes are executing. After having the needed input, process need change its state to activate. but in nowadays system this is not a direct activity. Again that process need to go to "ready state" queue and wait until chance comes to it. 

According to my opinion this is not an fair activity. why it can't be changed as follow.  
Here we can assign a priority value for each processes which needs to queue on waiting state.Priority value need to have two values as high and low. After completed the relevant input need process need to change to the "check state". At this state priority value need to be checked. If it is high, translation of "Ready state" queue need to be paused and transform "check state" process to active state. If it is normal it will be queued under the "ready state" as normally.

Algorithm :

Transform New State to ready State
Activate the Process
     If need to not be perform "wait State"
             continue until halted state
    else
            put to the waiting state
           check the priority value
           if high
               pause the "Ready state" transformation
              change "check state" to "Active state"
          else(low)
              change the "check" state to "ready state"  

I don't whether this idea is acceptable or not by the OS architectures. But this was the idea that pop up suddenly on my mind while listening to the process state diagram lecture at university.  

No comments:

Post a Comment