I've been working on a patch that is a roll up of Andrew Morton's patch, and also of some work by Nick Pollitt to use a prctl() interface to the cpus_allowed bitmask. It also includes a new bitmask 'launch_policy' which allows a process to set a launch policy which is used to determine it's childrens' cpus_allowed bitmasks prior to launch. The patch is against 2.4.10. It can be found on http://sourceforge.com/projects/lse and I'll also attatch the most recent version below. Robert, There are two reasons not to use the cpus_online_map. 1. It isn't (or at least wasn't as of 2.4.10) available on all architectures. 2. If cpus are added, or removed, the bitmask the user originally requested is effectively ignored. ie: if the user tries to set cpus_allowed to 0x0000ffff and we mask that against the current online map (0x00000003 in your example), and then another cpu comes online, the cpus_allowed bitmask will not be updated to reflect this change. Ingo, I'm going to look into using the set-affinity patch you posted with my patch. I also agree that /proc is not the best way to access this data, but I *do* believe it is *a* good way. I think that having both interfaces (/proc and a syscall) gives us the best of both worlds. Enjoy! -matt P.S.-please CC any replies, as I'm not on the list.