473,401 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Thread Starvation

Hello All,

To preface my question, I'm running python on an embedded PowerPC chip
(8xx), with a host OS of Linux. I'm seeing, in some of my applications,
thread starvation. I can create new threads, however their run methods
are never called. Interestingly enough, threading.activeCount() and
threading.enumerate() properly return all the threads I've started. Yet
none of them will get their run method called.

The python interpreter we use to run our python scripts is created
programmatically in its own thread (f that matters at all).

For quite sometime, I thought this was a memory leak on our side, but
I'm not convinced of that, yet I haven't ruled it out. If it is a
memory leak, it only manifests itself in threading, no where else do we
see strange behavior, and we write quite a few scripts targeted to this
platform.

90% of our scripts have threads that work just fine. It is a small
subset of our scripts that have thread starvation. It is worth noting
that if a script runs into this problem, *all* of the threads starve,
not just a couple of them starve.

Finally, the scripts that exhibit this behavior, always exhibit this
behavior. It doesn't seem to be dependent upon any external conditions.
What I'm curious about is the following:

- Has anyone ever encountered something similar to this?
- What are appropriate ways of debugging this? Are there ways to debug
the interpreter to get more information from it (i.e.: what is causing
it to not call run(), is there some mutex issue, resource issue, etc)?

I realize there are a ton of variables to take into account here, I'm
just looking for some ideas on what might be holding me up.

Thanks so much.

-Brett
Brett Humphreys
Software Engineer
Applied Innovation
Office: 800-247-9482 x2302
Fax: 614-798-1770
Jul 18 '05 #1
0 1184

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: FrankEsser | last post by:
Hello! I am not an expert on C++ programming and therefor I have a question: We use a kind of communication server that was written in C++ especially for our company. It just takes incoming...
7
by: Droopy | last post by:
Hi, I don't understand why sometimes, a loop running in a thread takes much more time than usual. I have a thread that must call each 20 ms a C++ unmanaged function. I made a C++ managed...
37
by: ales | last post by:
Hello, I have a problem with creation of new thread. The method .Start() of newly created thread delays current thread for 0 - 1 second. Cpu while delay occurs is about 5%. Any idea? Here...
8
by: Carl Heller | last post by:
If I'm creating a class to do some work that I want threaded out, where's the best location to call ThreadStart? Or does it depend on the nature of the work? a. Call it outside the class,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.