Process states on a single processor vs Dual-core

2019-09-08 09:23发布

I am currently revising for an exam and have come across a question that I am really not sure of.

1) Produce a clearly labeled diagram indicating the THREE states a process can take in a single-processor multitasking operating system.

This question im okay on (i think) my understanding is that a process state can be any of the states bellow. And a process will change its state as it gets passed around into different queues during its life cycle.

enter image description here

The question I ama having issues with is.

2) What changes would need to be incorporated to the three state diagram above for an OS running on a dual-core system?

I cant seem to find any information online, in my notes of in the book im using, OS Concepts by Silberschatz.

What i have found is a medium term scheduler which introduces two new states, Ready waiting and Ready blocked.

If someone could shed some light on this for me, or point me in the right direction on where to look it would be a big help.

Thank you.

2条回答
祖国的老花朵
2楼-- · 2019-09-08 09:56

Process states are entirely system specific. You asked specifically for Linux (not my OS of greatest knowledge) but my understanding is that Linux views process states differently from what is in that diagram.

In doing a search I found a number of conflicting Linux process state diagrams but this one matches my understanding of how Linux views states.

enter image description here

Produce a clearly labeled diagram indicating the THREE states a process can take in a single-processor multitasking operating system.

Linux appears to allow 6 states.

2) What changes would need to be incorporated to the three state diagram above for an OS running on a dual-core system?

If you are viewing the states from the point of view of the process, the answer is none.

查看更多
狗以群分
3楼-- · 2019-09-08 09:57

In my opinion there are two different possibility

First

Process states diagrams same as multiple core system,maybe there will be two running state,scheduler dispatch choose which process goes which core(running states) to start running

Second

process states diagrams folds to 2,every core have their ready ,running,and waiting queue,process sharing is costly transaction on cores,therefore every core should have own ready and running and waiting queue,if a process enter a one core,it must be finished this core,

查看更多
登录 后发表回答