馃攳
Process Control Block - YouTube
Channel: Neso Academy
[0]
in this lecture we'll be studying about
[1]
process control block so first of all
[3]
let us see what is this process control
[5]
block let us try to understand what are
[7]
the uses of this process control block
[9]
as far as the process is concerned so it
[12]
says each process is represented in the
[14]
operating system by a process control
[16]
block abbreviated as PCB and it is also
[20]
called a task control block so process
[23]
control block is something that we use
[25]
to represent a particular process in the
[28]
operating system so let us take an
[30]
example diagram to see how the process
[32]
control block looks like and let us see
[35]
what are the things we have in the
[36]
process control block which helps us to
[38]
represent that process in the operating
[41]
system so this diagram given here is the
[44]
example of a process control block so we
[47]
have things like process state process
[49]
number process counter registers memory
[53]
limits list of open files and so on so
[55]
this is just an example diagram showing
[57]
a process control block and what are the
[59]
things present in the process control
[61]
block so now let us see one by one what
[63]
are the things we actually have in a
[65]
process control block and let us see
[67]
what does those things represent or tell
[70]
about the process in an operating system
[72]
so the first thing that we have is a
[74]
process ID so process ID or process
[77]
number as it is given in this example it
[80]
shows the unique number or unique ID of
[84]
a particular process
[85]
so every process has to be represented
[87]
by a unique ID which will identify that
[90]
process so this process ID is the unique
[94]
number or identification that identifies
[97]
a particular process and this is one of
[99]
the things that is present in a process
[101]
control block which is used to represent
[104]
a particular process now the next one
[107]
that we have is process State so what is
[109]
process state process state tells us the
[112]
particular state in which a process is
[114]
at that particular moment now in the
[117]
previous lectures we studied about
[119]
process State and we saw that a process
[122]
can be in different states like the new
[124]
state running state waiting state
[127]
terminated State and so on so this
[129]
process state will tell
[131]
in which of those states is the process
[133]
in at that particular moment so this is
[136]
also another thing that is there in the
[138]
process control blog which will
[140]
represent a particular process so the
[143]
next one that we have is a program
[145]
counter so the program counter it
[147]
indicates the address of the next
[149]
instruction that has to be executed for
[153]
that particular process now let me
[155]
explain what this means now we already
[156]
studied that a process is a program in
[160]
execution when a program is in execution
[162]
at that moment we call it a process so
[165]
when a process is being executed the
[167]
lines of instructions or the lines of
[170]
codes are executed line by line now when
[174]
it is being executed this program
[176]
counter tells us the address of the next
[179]
line of instruction that has to be
[181]
executed so we have lines of
[183]
instructions that are being executed and
[185]
at a particular moment what is the
[188]
address of the next line that has to be
[190]
executed that is given by the program
[194]
counter so the program counter indicates
[196]
the address of the next line of
[198]
instruction that has to be executed for
[200]
a particular process all right so the
[203]
next one that we have is CPU registers
[205]
so CPU registers it tells us the
[208]
registers that are being used by a
[210]
particular process so there are
[212]
different kind of registers like the
[214]
index registers stack pointers
[216]
general-purpose registers and so on so
[218]
this CPU registers will tell us the
[221]
particular registers that are being used
[223]
by a particular process so this is also
[225]
another thing that we have in the
[227]
process control block so the next one
[229]
that we have is CPU scheduling
[230]
information so the CPU scheduling
[233]
information has the priority of the
[235]
processes it has the pointer to the
[238]
scheduling queue and also other
[240]
scheduling parameters now scheduling is
[242]
a very important topic as far as
[244]
operating system is concerned and there
[246]
will be a whole topic regarding it which
[247]
we will be discussing later but for now
[250]
let me give you a brief idea of what
[252]
shadowing is so we know that there are
[254]
many processes that are waiting to be
[256]
executed it's not only one process but
[258]
there are many processes that are
[259]
waiting to be executed socha dueling
[261]
determines which process has to be
[263]
executed first
[264]
or it determines the order in which the
[267]
processes has to be executed so there
[269]
may be processes with higher priority
[271]
than other processes so they may have to
[273]
be executed first
[274]
and also when processes are all waiting
[276]
in a queue it has to be determined how
[278]
much time has to be allotted to a
[280]
particular process and all those kind of
[282]
things are determined by the scheduling
[285]
algorithms so that is what we mean by
[287]
scheduling and so the CPU scheduling
[289]
information is also stored in the
[292]
process control block it is not shown in
[294]
this example over here but this is also
[296]
another thing that we have in the
[298]
process control block now next we have
[301]
the memory management information so the
[303]
memory management information from the
[305]
name itself you must have understood it
[306]
represents the memory that is being used
[309]
by a particular process so different
[311]
aspects of the memory all those
[313]
information regarding that will be
[315]
stored in the memory management
[317]
information and that is another thing
[319]
that is stored in the process control
[321]
block now next we have accounting
[324]
information so this is also not shown in
[326]
this example but we have the accounting
[328]
information so accounting information
[330]
keeps an account of certain things like
[332]
the resources that are being used by the
[334]
particular process so there are
[336]
different resources that are used by the
[337]
process like it can be CPU it can be
[340]
time it can be memory and so on so
[342]
accounting information it keeps an
[344]
account of all those resources that are
[346]
being used by a particular process for
[348]
its execution so this is also another
[350]
thing that is there in the process
[352]
control block and it is used to
[354]
represent the process and lastly we have
[356]
the input/output status information so
[359]
input/output stage information
[361]
represents the input/output devices that
[364]
are being assigned to a particular
[365]
process so a process during its
[368]
execution may need to use some of the
[370]
input/output devices so which are the
[372]
input/output devices
[374]
assigned to a particular process that
[376]
information is stored in the
[378]
input/output status information and this
[381]
is also a part of the process control
[383]
block so we see that all these things
[385]
over here they can represent our process
[388]
they represent the different aspects of
[390]
a particular process and all these
[393]
things together they are in a block
[395]
known as the process
[396]
control block and hence we see that the
[399]
process control block is used to
[401]
represent a particular process in the
[403]
operating system so I hope with that
[405]
process control block is clear to you
[407]
thank you for watching and see you in
[409]
the next one
[410]
[Applause]
[413]
[Music]
Most Recent Videos:
You can go back to the homepage right here: Homepage





