I'm curious about the use of fibers in Win32 threaded code. I've read about them and understand the concept, but I don't know if anyone has ever used them, and if so, how wide spread is that use in the industry.
Question: Have you used fibers in your Win32 programming and to what extent? If you've used them, please follow-up with some details about your experiences.
Threading on Intel® Parallel Architectures
OpenMP and POSIX threads on Linux*
To what extent is Intel's implementation of OpenMP on Linux* based on Pthreads? When I look at the code generated by Intel C++ or Fortran with -openmp, I see a lot of __kmpc* calls such as:
call __kmpc_fork_call
I know these are implemented in the compiler OpenMP lib:
/opt/intel/compiler70/ia32/lib/libguide.a
Open MP and Win32 APIs
1)Can OpenMP be used with Win32 API calls within, say, a simple "for" loop?
Example:
#pragma omp parallel for
for(...)
win32_api (i.e. OpenProcess);
2)I have separate threads calling the same Win32 APIs (i.e. OpenProcess). Is this thread-safe?
Thanks!
Hyperthreading and 'lock' prefix
Hi,
if the following two instructions
inc [eax]
inc [eax]
are executed in a single thread on a single processor,
the processor cares for the atomicity of 'inc', so it is
guaranteed, that after the two instructions the value at
[eax] has been incremented by two, although internally
each inc-instruction is broken down into multiple
micro-ops and is executed in multiple pipeline stages.
The same holds, if the 'inc's are executed in separated
threads on a single processor (the processor guarantees
Volatile and Windows Threading?
How important is it to mark your cross process variables and cross thread variable as Volatile with Hyper-Threading? For example delcaring them:
int volatile a;
instead of:
int a;
-Wayne
hyperthreading
I am starting a lot of threads on one machine. Actually
I am wondering how can i run a thread on processor selected by me. I mean when I enable hyperthreading then i can see 8 processors instead of 2. And i want to run task on let say processor 2. Is it possible to do so?
Low contention access to large data collection
An article whose URL was posted to the lock-free thread caught my eye. It's at MSDN Concurrent Access.
Using Pthreads on Windows
Clay,
I downloaded Red Hat's Open Source POSIX Threads for Win32and built the DLL on my system. I linked it to a Pthreads program on Windows and it ran correctly. It's a pretty easy way to get Pthreads programs working on Windows. I didn't do any performance experiments but I don't expect a significant performance loss. The Red Hat Pthreads implementation just wraps equivalent Windows threading functions.
Pthread stack issues
What is the relationship with the shell stack limit (ulimit -s ) and the stack size for threads chosen by the user with pthread_attr_setstacksize? Can the stack size for a created thread be made larger than the stack size for the parent thread? Are there any limits or defaults that users should be aware of?
Thread implementation in Linux
A customer asks:
"The implementation of the following threading functions, InterlockedIncrement()& InterlockedDecrement() are available for MS Windows. Are these, or counterparts, available for Linux?"
The following article suggests that there is no such implementation. Has that changes since then? If not, what is a good solution. http://www.cs.helsinki.fi/linux/linux-kernel/2002-10/0314.html
Thanks for your help.
