Hi!

  Some notes on thread and linux. I'm not a RT linux guru but I do know
how threads work under linux. The difference between threads and process
are threads are processes that share their page tables with other process.
Say you have a process that creates several threads. The threads will
share the same memory area with the parent. So if one thread accessed a
area of memory it will page fault. If the next thread accesses that memory
it will not page fault. If it where a process created by fork then it
would page fault. 

  Note: Threads are really only good for things like database programs
which the threads will share the memory area. The behavoir on how threads
are scheduled depends on the time spent in the thread. If a thread is
short term then even if you have several CPUs the threads will run one
after the other. Now if the thread last a long time the thread will
eventually migrate to another CPU. Why? Because threads can share teh same
memory its really fast to switch between threads on the same CPU. You
don't have to do anything with memory management. Now if a thread migrates
to another CPU then we have sync up the cache on all CPUs. This is costly.

Hop ethis helps find the problem.

James Simmons                                                      (o_
fbdev/gfx developer                                      (o_  (o_ //\
http://www.linux-fbdev.org                              (/)_ (/)_ V_/_
http://linuxgfx.sourceforge.net

On Sun, 19 Dec 1999, Robert & Patricia Warner wrote:

> I've got a RTLinux system up and running with aa couple of rtl tasks
> debugged and working.  Now i'm attempting to add the needed application(s)
> on the linux side.  One particular app is using pthreads and it has
> sucessfuly brought Linux to it's knees, after running for a short while.
> 
> Does anyone know of any problems with RTLinux and pthreads that I shoudl be
> watching out for?
> 
> Thanks
> Bob Warner
> 
> --- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> ----
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/~rtlinux/
> 

--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to