From: Peter.Mayne@cao.mts.dec.com (Peter Mayne)
Subject: Re: Locking Processes Into CPUs on AXP machines
Date: 1995/04/26 [thread overview]
Message-ID: <3nkbn9$jvp@jac.zko.dec.com> (raw)
In-Reply-To: 1995Apr25.175938.24679@eos.arc.nasa.gov
In article <1995Apr25.175938.24679@eos.arc.nasa.gov>,
maclure@eos.arc.nasa.gov (IanMaclure) wrote:
> On a multi-processor AXP ( 2100? ) ( under OpenVMS and OSF1 ) is
> it possible to specify that a given process be loaded into a
> predetermined CPU and remain there for the life of the process.
> I am definitely not interested in SMP as the processes are NOT
> in general symmetric.
I'm not sure what you mean by processes not being symmetric, but
one of the benefits of SMP is being able to dynamically schedule a
process on any processor.
However, for Digital UNIX:
runon(1)
SYNOPSIS
runon cpu_num command [command_args]
DESCRIPTION
The runon utility runs command on CPU number cpu_num. The command_args
parameter indicates flags or arguments, if any, that are specified for com-
mand. All threads created by command will inherit the CPU binding cpu_num.
This includes threads created as the result of a fork.
bind_to_cpu(3)
SYNOPSIS
#include <sys/types.h>
#include <sys/resource.h>
int bind_to_cpu(
pid_t pid,
unsigned long cpu_mask ,
unsigned long flag );
DESCRIPTION
Upon return from bind_to_cpu, all threads of the target pid are running on
the target CPU. Bound threads are not eligible for execution on any other
CPU. You release CPU binding by invoking bind_to_cpu with a cpu_mask of
zero.
And if you use threads:
pthread_bind_to_cpu_np(3)
SYNOPSIS
#include <pthread.h>
int pthread_bind_to_cpu_np(
pthread_t *thread ,
unsigned long *cpu_mask );
DESCRIPTION
This routine binds a thread to a particular processor on a multiprocessor
system. Once bound, a thread will only run on the specified CPU until the
thread terminates, or the binding is changed.
Specify a cpu_mask of 0 to allow a previously bound thread to execute on
any available CPU.
PJDM
--
Peter Mayne | My statements, not Digital's.
Digital Equipment Corporation | Author of NTj.
Canberra, ACT, Australia | "Shine on, you crazy Alpha."
next prev parent reply other threads:[~1995-04-26 4:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-04-25 4:00 Locking Processes Into CPUs on AXP machines IanMaclure
1995-04-26 4:00 ` Peter Mayne [this message]
1995-04-27 4:00 ` Vikas Sontakke
1995-04-28 4:00 ` Reece Hart
1995-04-29 4:00 ` Phillip Helbig
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox