r/C_Programming • u/userlivedhere • Sep 01 '26
Question How process ids are generated
i know fork creates processes but how process ids are generated
6
Upvotes
r/C_Programming • u/userlivedhere • Sep 01 '26
i know fork creates processes but how process ids are generated
View all comments
3
u/realdreamer1993 Sep 07 '26
the kernel have the main object(table/struct) that contain all data to track state of processes, then the ids is just the index. BTW kernel also just a program.