Technical article 109471

How to lock a process to a specific CPU under SCO OpenServer 5.0.x.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4

Written · Last revised

Problem

I want to lock a specific process to a specific CPU on a multiprocessor system.

Solution

The lockpid(ADM) command will allow you to lock a particular process to a specific processor.

First start the process. Then find the PID for that process. To find the PID of the process, type:

# ps -e  | more  <Enter>

If you know the name of the process, you can use:

# ps -e | grep <name>  <Enter>

The syntax for locking the desired process to a specific CPU is:

# /etc/lockpid -l <cpu> <pid>  <Enter>

NOTE: the "-l" is a lower case "L".

To unlock a process:
# /etc/lockpid -u <pid>  <Enter>
NOTES:    Locking a specific process to a specific CPU will not disallow
          the ability of other processes from using the CPU.

Generally speaking, locking a process to a processor is not a good idea as it can negatively affect the performance of a multiprocessor system.

See also

man page lockpid(ADM)

From the Xinuos technical article database, record 109471. Reproduced with permission. The original is at www.sco.com/ta/109471, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.