Describe the information of the process control block in C to structure the state

Updated on technology 2024-02-12
5 answers
  1. Anonymous users2024-02-06

    Here, where does the reference come from?

  2. Anonymous users2024-02-05

    2. Process status: it can be new, ready, running, waiting, or blocked, etc.

    3. CPU scratchpads: such as accumulators, index registers, stack pointers, general-purpose scratchpads, status registers, etc., the main purpose is to temporarily store data when interrupted, so as to continue to use it later; The number and type of computer may vary.

    4. CPU scheduling method: pointers such as priority, scheduling queue and other parameters.

    5. Memory management: such as tab tables, etc.

    6. Accounting information: such as the number of CPUs used and the actual time, time limit, account number, work or process number.

    7. Input and output status: The configuration process uses IO devices, such as tape drives.

  3. Anonymous users2024-02-04

    Process Control Block (PCB) (a special data structure set up by the system to manage the process, which is used to record the external characteristics of the process and describe the movement change process of the process. The system uses the PCB to control and manage the process, so the PCB is the only sign that the system is aware of the existence of the process. The process is one-to-one corresponding to the PCB).

    In different operating systems, the control and management mechanism of the process is different, and the information in the PCB is not the same, usually the PCB should contain some of the following information.

    1. Process identifier name:

    Each process must have a unique identifier, which can be a string or a number. 2. The current status of the process is status:

    Describes the current state of the process. For the convenience of management, the system is designed to form a queue of processes in the same state, such as the ready process queue, and the waiting process should form multiple waiting queues according to the waiting events, such as waiting for the printer queue, waiting for the disk IO completion queue, etc. 3. The corresponding program and data address of the process, so as to link the PCB with its program and data.

    4. List of process resources. Lists the records of owned resources other than CPUs, such as owned IO devices.

    A list of open files, etc.

    5. Process priority priority:

    The priority of a process reflects the urgency of the process and is usually specified by the user and set by the system.

    6. CPU on-site protection zone cpustatus:

    When the process cannot continue to occupy the CPU for some reason (such as waiting for the printer), release the CPU, and then protect the various state information of the CPU, so that the processor can restore the various states of the CPU and continue to run in the future.

    7. Process synchronization and communication mechanism is used to realize the mutual exclusion, synchronization and communication between processes. 8. The link word of the queue PCB where the process is located According to the current state of the process, the process is corresponding.

    9. Other information related to the process. For example, process accounting information, process time occupied by the CPU, etc.

  4. Anonymous users2024-02-03

    NCRE exam question, the main error is the word user, the running state is saved in the PCB, but the operating system can only read and schedule.

  5. Anonymous users2024-02-02

    ab, see the encyclopedia entry "process control block".

Related questions
7 answers2024-02-12

The first if(!) a) means that if a is equal to zero, take x -- the second and third means that if b and c are not 0, it is executed. >>>More

12 answers2024-02-12

a) Principle.

1. Minimization principle: first hide the window, and then draw the icon in the lower right corner. >>>More

6 answers2024-02-12

Define the struct:

typedef struct _legaladdress_{ >>>More

16 answers2024-02-12

Definition of a for loop.

for(the initial value of the variable; termination of operating conditions; The initial value of the first cycle i is 0, and it runs until i=3 stops i=2, and the condition is still satisfied, and the loop body is still executed, and the step size is 1+1 each time >>>More

7 answers2024-02-12

It's called the [batch] program, in fact, don't think that the program you mentioned above to deal with garbage is really powerful, it's amazing, when you have learned DOS, that program can be said to be a very simple thing; >>>More