Multi-threading related questions including technique, structure, and safety issues.
1
vote
2answers
290 views
Memory allocation of Classes that don't have any global data and locks
static void Main(string[] args)
{
var c2 = new Class2();
var c3 = new Class3();
var c1 = new Class1(c2, c3);
c1.Method1();
}
class Class1
{
...
-2
votes
2answers
132 views
When will be safe to choose Multi-thread design without dead lock? [on hold]
Sometime we really need to choose a multi-threaded design, because single-threading will block the UI or block another thread.
But sometimes using multiple threads is just one of the choices, for ...
1
vote
2answers
88 views
What are the different aspects to consider when porting code from a single threaded environment to a multi threaded environment or vice versa?
I want to provide some library functionality and a reference application, which will run on a fully-featured, POSIX-compliant platform. The app and library will need bi-directional serial port ...
3
votes
1answer
76 views
Are mutexes assigned to specific regions of memory?
I'm currently reading C++ Concurrency in Action by Anthony Williams and I'm facing an obstacle in thought.
First he describes deadlocks as when two threads lock simultaneously (at least, that's how I ...
2
votes
0answers
116 views
Design patterns for multi-threaded messaging server
I'm designing an instant messaging server as a personal exercise to improve my understanding and application of multi-threading and design patterns in Java. I'm still designing, there's no code yet.
...
2
votes
1answer
76 views
Python multithreading and utilizing modern processors - what is the downside?
CPython implementation detail: In CPython, due to the Global
Interpreter Lock, only one thread can execute Python code at once
(even though certain performance-oriented libraries might overcome
...
1
vote
2answers
58 views
Listener, logger, plotter - what threading arcitecture to choose for this?
I am constructing a program that does several things.
Listens to a port. Every second a string is received
When new data is received, it has to be logged. No errors or skipped entries are allowed
...
1
vote
5answers
172 views
What are some good assignments for an introductory course on concurrent programming? [closed]
I am teaching a course which involves introducing the students to the concept of threads and concurrent programming. I am in search of programming assignments that can gently get them to accept the ...
2
votes
2answers
180 views
How do I get rid of cyclic references in this design?
I have 3 classes: Meeting, Project and Agenda.
A Project contains all sort of information + a list of meetings.
The Agenda contains a list of upcoming Meetings.
A Meeting contains some data + a list ...
2
votes
1answer
69 views
Multi-Thread Return Single SQL Result
I am having some difficulty with MySQL and returning a unique row to a thread. I want it so the thread will search for a row from the table where the bit (see below) is false and only one row is ...
0
votes
1answer
112 views
Whats the 'avarage best' way to make this library safe for concurrent operations
I've made a little library called SignalR.EventAggregatorProxy
Before I push it into 1.0 state I need to fix so it works safly with concurrent operations. Easiest way is lock all operations but thats ...
1
vote
1answer
83 views
Which child process will inherit threads of parent process?
What happens when one process have child threads and child process , will child process inherit all child threads of parent process.?
Assume OS is Linux . Let it be Java Threading model.
3
votes
3answers
196 views
Should multi-threading be used for tasks which does not involve IO operation?
I was reading a book on OS and got confused between different terminologies.
I hope i will get my doubt cleared here.
These questions might be very basic for some experts, but i find this platform ...
1
vote
1answer
139 views
How to make a method synchronized across all instances of an object
Today I was asked this interview question and could not answer. :
If you have two instances of a Person Object and each of them have a setAddres method that is synchronized. Now if it was only one ...
6
votes
3answers
368 views
How many threads should access the file system at the same time?
We have a module in an application which stores data in multiple files and multilevel directories and access them from multiple threads (both reads and writes). The directory structure is based on a ...