how to initialize PCB in an operating system like Linux? -


typedef struct pcb {     void *tf;     uint8_t kstack[kstack_size]; } pcb  //this structure    

in question "pcb" means "process control block". in linux terms think task_struct.

the first task_struct initialized init_task.

other processes created fork(2), clone(2) etc. of these end calling do_fork. heavy lifting of creating new task_struct done copying old 1 in copy_process in turn calls dup_task_struct


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -