Messages in this thread | | | Subject | Re: Some very thought-provoking ideas about OS architecture. | Date | Mon, 21 Jun 1999 11:45:27 +0100 (BST) | From | Alan Cox <> |
| |
> This is partly right, and partly wrong. Actually, some light-weight > message passing protocols can be cheaper than function calls. A function
No. A message pass is a function call is a message pass.
> call to a kernel function requires two state transitions (user->kernel > and back), and two context switches; since the kernel wants to massage > different data than the user process, it also has an effect on the > cache.
No context switches, just a pair of priviledge transitions.
> Message passing can make this cheaper, if (and only if) your messages > are handled asynchronously. Put a bunch of messages into your shared > memory message buffer (simple *ptr++ = id; *ptr++ = arg; ...), and when > you are done, do the one state transition and context switch, and let
function(int num_jobs, struct job *joblist)
next ?
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |