Ask your own question, for FREE!
Computer Science 15 Online
OpenStudy (anonymous):

at any time only one pcb is active!! comment

OpenStudy (anonymous):

BY PCB YOU MEAN PROCESS CONTROL BLOCK??

OpenStudy (anonymous):

yea

OpenStudy (anonymous):

OHK..THEN SEE PCB IS JUST A DATA STRUCTURE WHICH CONTAINS THE STATE OF A PROCESS SUCH AS PROCESS ID , PROGRAM COUNTER , CPU REGISTER ETC. SO WHEN A PROCESS IS GIVEN A CPU TO RUN , ITS STATE IS TAKEN FROM PCB OF THAT PROCESS . EVERY PROCESS HAS ITS PCB . ALSO WHEN PREEMPTION OF ANY PROCESS TAKES PLACE THEN STATE OF THAT PROCESS IS SAVED INTO ITS PCB.

OpenStudy (anonymous):

STILL HAVING DOUBT??

OpenStudy (anonymous):

i know what a pcb is............my question was what does it my by "Ony one PCB is active at any time" as far as i know pcb contains every bit of information related to any process. and there are many processes in memory and so all of them are active or does this mean coz a cpu can handle only a single process( i mean the running state) so only one PCB is active? @ktobah

OpenStudy (anonymous):

1ST OF ALL I MUST TELL YOU CPU CAN HANDLE MORE THAN ONE PROCESS AT THE SAME TIME (IN MULTIPROCESSOR SYSTEM)

OpenStudy (anonymous):

what do you mean by handling many processses at a time?

OpenStudy (anonymous):

YES... MEANS MORE THAN ONE PROCESS CAN BE IN RUNNING STATE AT THE SAME TIME...

OpenStudy (anonymous):

hmmm really and howz that? in a single core cpu?

OpenStudy (anonymous):

no.. not in single core...but in multicore

OpenStudy (anonymous):

ok so what about my question? only a single pcb is active at any point of time

OpenStudy (anonymous):

depends on what type of system do you have..

OpenStudy (anonymous):

u talking about the OS? so what about the good old dos? or say the unix or mac or windows 8 actually i think nthin to worry about dos cos there can only be a single program running what about solaris?

OpenStudy (anonymous):

yes...in dos only one process is active at a time,, while in solaris , it will depend on the no of kernel thread. kernel threads are responsible for parallelism ... so the no of kernel thread will decide how many processes(rather threads) can be active at a time.

OpenStudy (anonymous):

join this group on facebook.. it's only mean for OS discussion .. people will help you https://www.facebook.com/groups/os.learners/

OpenStudy (anonymous):

Avinash, you said : "as far as i know pcb contains every bit of information related to any process.", I think this is your problem, a pcb contains every bit of information related to ONE process, so n other word , each process has its own pcb; I think this explain your sentene, only one pcb is active in a time.

OpenStudy (anonymous):

yea i kno that pcb is specific to a prob so wat does that mean only one pcb is active at any point of time? and @manishdablu thanks for ur offer but no thanks

OpenStudy (anonymous):

Ah as we know one processor can execute one and only one process at any point of time, so when a process is in execution we mean by that, its pcb is active, if you want : it's in use.

OpenStudy (anonymous):

oh ok thank you

OpenStudy (anonymous):

no..you are wrong.. pcb is just a data structure which is not a active entity rather it's apassive entity which is used by short term scheduler to get and set the state of the process . so when process is in execution pcb has no work.. i mean short term scheduler don't use it. so it makes no sense if you say passive entity to be active...

OpenStudy (anonymous):

i think this is a valid point that pcb is a passive entity or is it really a passive entity? it also has information regarding the registers and stuff.....so is it really passive? @ktobah @infinity_ @nick67

OpenStudy (anonymous):

When I said it's active during the execution of a process, I meant the start of execution because before the execution start, the scheduler choose which pcb (process) and then its content will be charged to the memory, so I meant the time of charging the pcb we can consider it active, you can say it changed its state from passive to active. I didn't mean during all the execution, maybe I said the wrong words to describe my idea.

OpenStudy (anonymous):

so what about the rest? like one process is running and the reamaining are in other states say ready or blocked r waiting?

OpenStudy (anonymous):

Yes, this is true, I mean one is in execution and the others, ready, blocked, waiting, finished, what about this ?

OpenStudy (anonymous):

so wat about their pcb?

OpenStudy (anonymous):

It's in a queue, then when the CPU is free the scheduler will choose one process and charge its pcb on the memory, and so on...

OpenStudy (anonymous):

yeah some sort of prority queue i guess so wen a program is running no pcb is active r say my statement shud be like at any time ATMOST one pcb is active

OpenStudy (anonymous):

I am not really good in English enough to tell you about your statement haha, but I can say : The pcb is active when a process start execution. And about the queue strategy, there are many ways like : FIFO, LIFO, Priority.....

OpenStudy (anonymous):

i thot it was priority coz every process is assigned some priority but i think it s more complicated that this now what after a process starts execution lol this is gonna be the longest thread about pcb

OpenStudy (anonymous):

haha When the process is in execution, its pcb is in memory still, when it stop (finished or interrupted, or I/O) here a swap in/out happen, means change of pcb.

OpenStudy (anonymous):

yeah the concept of swapping r context switch by a medium scheduler? so the pcb is still active? and there may be many pcb in the memory

OpenStudy (anonymous):

Actually as I know just one pcb in the memory, it's because the CPU can execute just one process. And people all the time think to make the memory available as much as possible, so putting many pcbs in the memory will be useless. "Just my point of view" And yes, it's a scheduler. About active, I really consider it active, why ? Because as we know the CPU to continue the execution of a process, it needs to know which instruction need to execute (instruction number 1, 530, or 1000!!!), for that the CPU read it from a register, and its updated in the pcb in a continuous way. "I think that make it active"

OpenStudy (anonymous):

yea sorry ther was a net prob i got it what actually that statement means since pcb is updated for every cycle it is active and any cpu can run only one process at any time so only one pcb can be active nd @ktobah if there are many pcb's in the memory it wud be easier to fetch and switch b/n the processes so......i think it not that useless

OpenStudy (anonymous):

perhaps you guys din't get my last comment .. as i said pcb is a passive entity.. so you should better understand what does "passive" mean?? see .. Active entities are those which can make decision (eg. process , scheduler etc) whereas Passive entities (eg. LWP , PCB etc) are those which cann't make decission of their own. so as i said PCB is an passive entity which is used by active entity like scheduler.. so active entity are always active eg. process is always active(even when it is in ready queue ,or waiting). that's it ..any problem guys??

OpenStudy (anonymous):

Manishdablu, as I see what are you talking about and what Avinash is talking about, are two different things.

OpenStudy (anonymous):

yea i am not concerned about those who have the control on a process or it's excution sequence.......... -.- thank y'all

OpenStudy (anonymous):

ok... so what do you understand from the discussion about pcb??

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!