- Integrated Systems
- About Us
- Integrated Systems
- About Us
06-18-2009 08:41 AM
There is a multi threaded process running on VMS 7.3-1
Is there any way to determine that the process is a multithreaded (Pthread).
$sh sys/multi does not show that it is a multi thread process.
Is Kthread has anything to do with Pthread ?
06-18-2009 09:04 AM
what problem are you trying to solve ?
You can use SDA to determine, if a process is running pthreads:
SDA> SET PROC/IND=
SDA> pthread t
will print following message, if process is not threaded:
Process "CLUSTER_SERVER" (PID 20200087) is not threaded
SDA> SHOW PROC/IMA and look for PTHREAD$RTL
Kernel threads support multiple execution contexts within a single OpenVMS process (since OpenVMS Alpha V7.0). DECthreads (pthread) is a user mode thread manager, kernel threads are the basis for OpenVMS scheduling inside the executive.
The system parameter MULTITHREAD determines the amount of multithreading possible.
06-18-2009 01:51 PM
Pthread is really an implementation of "coroutines" - that is, a number of threads of execution which timeshare within a single process. They (obviously) share the same address space and data. Only one thread can execute at a particular time. Thread scheduling is done by the Pthread library within the process. This is usermode, which you could implement yourself without privilege.
Kthread is very different. Each thread has most of the attributes of an independent process. The special thing about the threads is they share the same address space. Scheduling is by the operating system, and, in a multi processor environment, independent threads can execute simultaneously. This cannot be done without privilege.
Kthread threads are therefore visible at the OS level, and are displayed in SHOW SYSTEM with the "M" flag. Processes using Pthreads are not externally visible. You can infer them, as Volker has shown, but realise that the presence of PTHREAD$RTL in the image activation list does not necessarily mean it's in active use.
06-19-2009 03:11 AM
Is there any problem you want to solve ? Or is this just a question out of pure interest ?
06-19-2009 05:07 AM
The response received is very poor but system is functioning properly.
No problems with the network has been detected.No errors are found.
Thanks for your time...
06-19-2009 05:28 AM
By default, kernel threads are disabled for a program but can be enabled at link time with the /threads_enable qualifier. You can also use the threadcp program in sys$update (set command sys$update:threadcp.cld) to examine/modify the flags in an existing executable.
Kernel mode threads are disabled by default because true concurrency tends to expose subtle errors in the threading logic of many pthreads programs. Also, it's frequently the case that the parallelism acheived doesn't outweigh the added overhead of kernel thread scheduling vesus the user mode scheduler.
06-19-2009 05:57 AM
Since when did you have the performance problem and why do you think it has something to do with pthreads?
Purely Personal Opinion