.

Wednesday, October 16, 2019

Process Control Block Essay Example | Topics and Well Written Essays - 1000 words

Process Control Block - Essay Example terminals, devices), process owner (user ID), Parent (pointers to parent or child processes), save registry (process registers, stack information and pointers), process IDs (I/O, IPCs), process state (ready, running or standby mode), memory pointers (MMU registers) (Silberschatz, Galvin and Gagne, 2002). PCBs classified under process control information are : scheduling and state information (i.e., the current state of the process, time slot, time to run, the priority of process) , data structuring (i.e. pointer to parent process or a pointer to child process), interprocess communication (i.e. message passing, synchronization, shared memory), process privileges , memory management and resource ownership (i.e. retrieval of file ownership). In Unix, for example, the process structure has two separate places in memory (kernel and user space) where it stores PCBs. Under this arrangement, process is started at the information (process ID, scheduling priority, etc.) level. During linking stage, the PCBs are defined for queuing. Once the process is ready for initialization, queuing is linked with other PCBs. The PCBs assign pointers from parent to child to subsequent relative processes. The execution of the process comes from the user level. Once system level is reached, the system switches to system mode and utilizes kernel stacks to continue with the process. (Silberschatz, Galvin and Gagne, 2002). Linux PCBs act almost in a similar fashion as Unix. Linux uses the structure task_struct to describe the characteristics of a process. This structure is managed through a series of indicators called a task vector. The number of processes that could be made at one time is only limited by the capacity of the task vector, which by default has 512 entries. When new processes are created, new structures are assigned from the system memory and are then added to the task vector. The vector pointer points to the most recent processes being run, making it easier to locate (Nutt, 2004). Data structure that defines the "process identification information": struct task_struct { int pid, pgrp, session, leader;unsigned short uid, euid, suid, fsuid;unsigned short gid, egid, sgid, fsgid; } For each process initiated, a unique own process ID number and uid is assigned. Afterwards, it is given a groupID, pgrp, and a session identification. For each session, a leader process code is also designated. Every process has its distinct process ID number, uid, and is assigned to

No comments:

Post a Comment