Question: struct saved_regs{ double reg1, reg2, reg32, reg_pc; }; struct pcb_type{ int proc_id; int proc_priority; int proc_state; int proc_class; struct saved_regs *reg_pt; }; struct process_list{ struct

struct saved_regs{ double reg1, reg2, reg32, reg_pc; }; struct pcb_type{ int proc_id; int proc_priority; int proc_state; int proc_class; struct saved_regs *reg_pt; }; struct process_list{ struct pcb_type *pcb_pt; struct process_list *who_follows; }; struct process_list *start = NULL; int allocated_id = 1; int allocated_prio = 1; int allocated_class = 1; struct saved_regs *alloc_saved_regs (); struct pcb_type *create_new_pcb (); void add_new_process (struct pcb_type *);
Implement a prototype list of process control block (PCB) in C language. Please follow the specifications below: (1) Must use the headers given in the next page. All you need has been given. (2) Must use malloc and sizeof to create new PCBs. (3) Must create and put 12 processes into the PCB list. (4) Your code must show the following information for each process. Here is the example: index of process: 7 addr_pcb = 40003108 proc_id = 2 proc_class = 2 proc priority = 2 proc state = 0 (5) Your complete C program should be no more than 120 lines (Excluding the headers in the next page) Implement a prototype list of process control block (PCB) in C language. Please follow the specifications below: (1) Must use the headers given in the next page. All you need has been given. (2) Must use malloc and sizeof to create new PCBs. (3) Must create and put 12 processes into the PCB list. (4) Your code must show the following information for each process. Here is the example: index of process: 7 addr_pcb = 40003108 proc_id = 2 proc_class = 2 proc priority = 2 proc state = 0 (5) Your complete C program should be no more than 120 lines (Excluding the headers in the next page)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
