Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mproc & proc

332 views
Skip to first unread message

Sea

unread,
May 5, 2006, 12:28:40 PM5/5/06
to
hi, i'am a newbie to the minix and i am reading minix PM sources these
days.
who can tell me the relationship between Struct
mproc[servers/pm/mproc.h] and Struct proc[kernel/proc.h]

Peter Boonstoppel

unread,
May 5, 2006, 6:08:20 PM5/5/06
to
> who can tell me the relationship between Struct
> mproc[servers/pm/mproc.h] and Struct proc[kernel/proc.h]

Both are process tables and both contain entries for every running process.
Essentially the two tables are just copies, but they may contain some
different fields. The main process table is of course managed by the kernel.
The reason there exists a second process table in the PM (Process Manager)
is that the PM is running in user space. From there it can't access the
kernel datastructures (directly), but it needs access to this information
for fork's, exec's, etc. So for performance reasons the table is duplicated
(otherwise the PM would have to use message passing for every single access
to the process table). However, this also means that any update to one of
the two tables should be propagated to the other.

Peter Boonstoppel


Sea

unread,
May 5, 2006, 9:15:15 PM5/5/06
to
thanks a lot , Peter!

0 new messages