Sponsored Content
Full Discussion: process -> 1 cpu
Top Forums UNIX for Advanced & Expert Users process -> 1 cpu Post 17922 by Perderabo on Thursday 21st of March 2002 07:48:25 AM
Old 03-21-2002
The only unix versions that I work with are HP-UX and SunOS. HP-UX has mpctl(2) and SunOS has processor_bind(2). Both of these calls can bind a thread to a processor.

In unix these days, a process is a collection of threads. And so you could bind several threads of a single process to different cpu's thus allowing them to run simultaneously. Both calls have the ability to bind all threads of a particular process to a cpu. When used this way, they are probably very equivalent to your windows function.

I don't know what the deal is with other versions of unix with respect to cpu binding. I would be interested if anyone else can shed more light.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

process not using enough cpu

I am running solaris 9 on a SUn 480r. It is running SAS statistical software, these processes in full flow normally run at about 50-60% cpu (theres nothing else really running on the box) this is fine, and the SAS jobs get run nice and quick. However over the last few weeks everytime a SAS job is... (1 Reply)
Discussion started by: hcclnoodles
1 Replies

2. UNIX for Advanced & Expert Users

how to bind a process to a CPU

Hi all please can any body please suggest me how to bind a process to a particular CPU on unix machine. i have a unix machine with 2 CPUs and i wanna have my process running on CPU 0. please suggest. (11 Replies)
Discussion started by: Raom
11 Replies

3. AIX

cpu utilization of a process

Hi, How can i find out the average cpu utilization of a particular long-running process in AIX? is there some command for this Thanks (2 Replies)
Discussion started by: iam
2 Replies

4. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

hi, i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies

5. Shell Programming and Scripting

CPU Usage for a particular process

Hi, I have a shell script. But, upon execution of the same, the cpu usage is sometimes getting 100 % (checked executing top command). At that point of time, my process hangs, doesn't run anymore. I need to kill it manually. My concern is, is there any default method, by which I can check... (1 Reply)
Discussion started by: jitendriya.dash
1 Replies

6. Shell Programming and Scripting

Capturing the CPU% used by a process

Hi, I just wonder I need to write a script where I can check if a particular process is consuming X amount of CPU. I was thinking of using the ps command but doesn't seems to work. Any ideas. Thanks. (2 Replies)
Discussion started by: arizah
2 Replies

7. Red Hat

Process by CPU

Hello All, I am preparing a script to capture the processes consuming more CPU. So is there any way that i can sort & redirect to file only those processes consuming more than 5.0 % using ps command itself. Regards Ankit (3 Replies)
Discussion started by: ajaincv
3 Replies

8. Solaris

process CPU time

We are using JAVA program and strange thing is it takes 100% CPU when not in use. The program function is to stream a file on output port (one direction). It checks one directory and when there is a file in it, starts. While it is streaming the CPU usage is normal, about 20%. But, if... (9 Replies)
Discussion started by: orange47
9 Replies

9. Emergency UNIX and Linux Support

CPU and memory utilization of a process, by process name

Can someone please help me with a script that will help in identifying the CPU & memory usage by a process name, rather than a process id.This is to primarily analyze the consumption of resources, for performance tweaking. G (4 Replies)
Discussion started by: ggayathri
4 Replies

10. HP-UX

Process going to 100% CPU

I have a httpd process which uses up 100% cpu. This makes my application to stop working and it just gets hung. I tried getting the tusc output looks something like this: # /usr/local/bin/tusc -pl 26516 ( Attached to process 26516 ("/opt/hpws22/apache/bin/httpd -d /opt/hpws22/apache -k... (3 Replies)
Discussion started by: chacko193
3 Replies
pset_bind(2)							System Calls Manual						      pset_bind(2)

NAME
pset_bind() - bind process or thread to a processor set SYNOPSIS
DESCRIPTION
The function binds thread(s) or process(es) specified by idtype and id to the processor set pset. If idtype is then id specifies the pid of the process to be assigned, and the binding affects all threads of the process. If idtype is then id specifies the lwpid of the thread to be assigned, and the binding affects only the specified thread. You cannot spec- ify a pthread ID for pthreads in id, an lwpid is required. See in pthread_processor_bind_np(3T) for information on binding pthreads to processor sets. If idtype is then id specifies the effective user ID of all processes to be assigned, and the binding affects all threads in these pro- cesses. The operation is not a "success is all or none" type, because it rebinds as many processes as possible without error. If idtype is then id specifies the process group ID of all processes to be assigned, and the binding affects all threads in these pro- cesses. The operation is not a "success is all or none" type, because it rebinds as many processes as possible without error. All pro- cesses in a process group need not have same access permissions to target processor set. If opset is not it contains the previous processor set binding of the specified thread or process upon successful operation. However, opset is ignored if idtype is or All threads of a process need not be assigned to the same processor set. If id is then idtype identifies the target process(es) or thread(s) to be assigned to pset. The identifies the calling process, whereas identifies the calling thread. The identifies all processes with the effective user ID of the calling process, and identifies all pro- cesses in the process group of the calling process. If pset is or the system default processor set is the target processor set. If pset is the processor set binding is not changed, the current processor set's processor set ID is returned in opset. If idtype is or request has no meaning. No special access privileges are needed for operation. If pset is the same as the current processor set for the specified process or thread, the operation is considered a request. The system daemon processes are not restricted to any user defined processor sets. They may execute on any processor in the system irre- spective of the processor set configuration a user may have set up. The processor set binding of system daemon processes may not be changed. The operation on system daemon processes returns a special processor set ID of to indicate they are treated differently. Note: The system daemon processes are created in the kernel for kernel activities, and not the user daemon processes that execute in user space. A user with the privilege, or a user with EXEC permission for the processor set pset may affect the binding change. The and functions may be used to set and query the processor set access permissions. See pset_getattr(2)). If the thread or process being assigned to pset has binding to a processor or a locality domain in its current processor set, the binding is reassigned to a processor or locality domain in the new processor set pset. If pset is empty (no processors are assigned as yet), the behavior of function depends on the value of attribute. The default behavior on an attempt to bind a thread or a process to an empty processor set is to fail the request. The child process and its first thread created by a or function inherits the processor set binding from the parent process. The new threads in the multi-threaded process inherits their processor set binding from the creator thread. Security Restrictions Some or all of the actions associated with this system call require the privilege. Processes owned by the superuser have this privilege. Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
returns the following values: Successful completion. Failure. is set to indicate the error. ERRORS
sets to one of the following values if the corresponding condition occurs. The memory location pointed to by opset is not writable by the user. pset is not valid. idtype or id is not valid. pset is empty and the current setting of processor set attributes does not allow this operation on an empty processor set. The memory location pointed to by opset is NULL and the operation is requested. The processor set functionality is not supported by the underlying HP-UX version. User does not have necessary permissions to bind a thread or a process to specified processor set. The specified thread or process is a system daemon. The specified thread, process, user ID, or process group does not exist. EXAMPLES
Migrate the current thread to another processor set new_pset, and retrive its current processor set in old_pset. SEE ALSO
psrset(1M), fork(2), pset_assign(2), pset_create(2), pset_ctl(2), pset_destroy(2), pset_getattr(2), pset_setattr(2), vfork(2), privgrp(4), privileges(5). pset_bind(2)
All times are GMT -4. The time now is 06:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy