- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How is this accomplished without calls to clone(1) under Linux? Or, if it does use clone(1), why would startup be so much faster?
Also, is it possible to use tbb in a .so file, where the loading program has no knowledge of it? It seems like if clone is involved, the parent program might be surprised to have children, possibly be receiving signals, etc.
Is there a TR somewhere that describes the implementation?
Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel TBB has threads. In fact, it maintains a thread pool that by default is created with one thread per processing element. What you're seeing with the "better than threads" comments is a desire to shift the focus off those threads and onto the actual work the developer is trying to accomplish. Threads are a construct tied to the particular hardware your program is running upon. "Tasks" are units of work that canbe described without reference to the underlying threads. There's an intendedphilosophy shift towards thinking about the work, not the workers, and to leave worker management to the library. And now that Threading Building Blocks has been provided to the open source community, you can download the code and see how it works for yourself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That said, it would be useful if there were also a concise technical summary available of the mechanism and compatibility with other techniques. For my own project, for example, I'm curious whether TBB-based code could be linked into a Python module. This would be very useful, but it's not obvious whether TBB code would be compatible with the Python interpreter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know much about linking to Python, but a quick scan of the Python/C API reference manual suggests to me that the relationship between Python and its C extensions is fine grained and tightly coupled. My first concern about integrating a TBB managed module into this environment would be thethread safety of that environment. TBB has its own concurrent containers because the STL versions are not thread-safe. Are there similar issues with Python data structures? Consider reference counts. TBB offers an atomic
Given these sorts of questions, I would be very careful about attempting such an integration. Though it may not match the philosophy of embedded C in Python, I'd start with aself-contained plug-in that exposes parallel programming through its use ofTBB to complete some specific computationally intense task and doesn't rely on Python object structures intervening in that computation.
![](/skins/images/7FC17B7B85029576C25F1E43CE255B51/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page