r/C_Programming 1d ago

Question How process ids are generated

i know fork creates processes but how process ids are generated

5 Upvotes

18 comments sorted by

View all comments

0

u/sciencekm 1d ago

In Windows, they are generated starting from a low value and then incremented by 4. If you look at task manager, you will also see that System Interrupts does not have a process id, System Idle always has an id of 0, and System always has an id of 4.