Questions tagged [multi-tasking]
Questions about techniques for making multiple independent tasks (processes or threads) appear to execute concurrently, either by quickly context switching from one task to the next on a single processor, or by really executing the tasks in parallel on several processors.
17
questions with no upvoted or accepted answers
4
votes
0
answers
159
views
Task scheduling algorithm that limits concurrency
My prof introduced us an algorithm with semaphores that was used to solve the "dining philosophers" problem.
The algo is ok, apart from that it limits concurrency.
What does mean that it "limits ...
3
votes
0
answers
1k
views
Proof of Manna-Pnueli algorithm for mutual exclusion being incorrect
Suppose we have the Manna-Pnueli algorithm for mutual exclusion:
I was trying to find a sequence that violates mutual exclusion and I came up with this:
...
2
votes
0
answers
265
views
Processor consistency and cache coherence
Consider this example from Wikipedia:
...
2
votes
0
answers
373
views
many to many multithreading
In many to many multithreading model the processor threads are multiplexed to a lesser or equal number of kernel threads.
What exactly does it mean??
Does it mean that if a kernel is executing a ...
1
vote
0
answers
47
views
Puzzled by this interview problem of scheduling a computation graph on a single-processor under a memory constraint
I recently went through a interview session for a SWE/CS role at a well known company.
It wasn't specifically a "coding-round" but was titled a "domain interview" session, so I ...
1
vote
0
answers
38
views
Intelligent task distributor
On a distributed system, there are more than 50 machines than continuously read from a database which tasks they have to process.
There is no criteria based on which a certain machine chooses which ...
1
vote
0
answers
27
views
Parallel Thread Processing Variable Question
if there is a better stack exchange suited for this question please inform me.
say you have a thread that is constantly checking the state of a variable in 2 ms intervals
...
1
vote
0
answers
89
views
Task assignment problem with capabilities and time restrictions
I have the following optimalization problem. I use the notations below because maybe it would be easier to understand that way, but I'm not good at conventions – I'm not sure if I'm using it all the ...
1
vote
0
answers
31
views
Definition of PrefixSum function
I came across this paper and attempting to go through the implementation of randomized selection algorithm on page 8.
Step 1 of the algorithm suggest to compute $s = PrefixSum(n_i, p)$. Where $p$ is ...
1
vote
0
answers
69
views
How to Optimise Each Multithreading Technique? (Cooperative/Preemptive/Simultaneous)
I am currently in the process of writing an IB Extended Essay on the efficacy of multithreading on increasing the performance of applications. So far, I have been able to deduce that there are three ...
1
vote
0
answers
69
views
semaphore for two groups of processes
Can someone help me giving a pseudo code to this problem : There are two groups of processes , A and B. Maximum 3 Processes from group A or group B(only from one group) can use the given resource . ...
0
votes
0
answers
18
views
Final outputs of running multiple processes at the same time
I'm encountering a problem. Given the following code:
void withdraw(int x){
if (balance > x) balance = balance –x;
else cout << ”failed”;
};
Assume ...
0
votes
0
answers
29
views
SMP operating system that had been "proven" to be bug free?
Many years ago someone told me about a historical SMP operating system (or program?) that had been all but proven to be bug free (or something close to this). But yet turned out to have bugs that were ...
0
votes
0
answers
24
views
Algorithm for dividing works into threads by priority
TL;DR
Is there an existing algorithm for dividing W works each with priority P using T ...
0
votes
0
answers
470
views
matrix product openMP code in C runs slower in parallel than series
If I start with 4 threads when I run my code and increase thread number each time I run it, my run time decreases as you would expect. However, my run time for 1 thread is significantly smaller than ...
0
votes
0
answers
36
views
Concurrency and non deterministm
I was introduced in concurrency programming this morning.
I haven't understood why "non deterministm" is a fundamental aspect of cuncurrenty programming.
What i think is that, since there is a ...
0
votes
1
answer
240
views
What is the Difference Between Many-to-Many (M:M) Threading and Hybrid (M:N) Threading?
I have been researching threading and come across several websites which all say contradicting statements about which and how many thread models exist. Some websites say there are only three: 1:1, M:1 ...