Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
0answers
20 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
1answer
30 views

How does the cpu know which process to wake?

In general, my understanding is: the cpu is executing a process/thread until either it is interrupted, the scheduler kicks it out, or it's waiting for something else (I/O for example), when it's put ...
0
votes
0answers
33 views

Parallel algorithms with desired sequential workload

Could you share any known algorithm which leans on following patterns? These patterns have both multithreaded and sequential workload. Those algorithms need to be joined to complete some sequential ...
0
votes
1answer
14 views

multithreading - duration of jobs

" How long will it take for 2 jobs to complete if they're running in parallel, knowing that both have a total of 20 minutes of CPU usage time and 50% IO" I calculated the CPU usage: ...
1
vote
0answers
29 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
0answers
30 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 ...
0
votes
1answer
22 views

Can Multiprocessor Systems Implement Both Temporal Multithreading and Simultaneous Multithreading?

I am aware that multiprocessor systems often implement simultaneous multithreading in order to allow multiple threads to run on different CPUs. I am also aware that uni-core systems often implement ...
0
votes
1answer
46 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 ...
1
vote
0answers
57 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 ...
2
votes
1answer
48 views

Why does parallelising slow down this simple problem against looping through all the data?

I've been using multiprocessing and parallelisation for the first time this week on a very large data set using 32 CPUs. I decided to explore it for a smaller task just to see if I could learn ...
3
votes
2answers
150 views

Skip List estimate number of elements less than (or greater than) a value

I am looking for a thread safe data structure where an element can be searched in $O(\log n)$, for any value, $x$, the number of elements greater than (or less than) can be estimated in $O(\log n)$,...
1
vote
0answers
29 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 . ...
4
votes
1answer
77 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 ...
0
votes
1answer
75 views

Concurrency and fairness

I'm studying the concurrency in programming and the atomic instructions. What i have not understood is the concept of "fairness" applied to this matter. Can you give me an hint ?
0
votes
0answers
24 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
1answer
220 views

What does an “I/O Task” mean?

While reading an article, I noticed the use of term 'I/O Task': Indeed, suppose the currently running process is performing an I/O task (which, by definition, does not need the CPU to be ...
0
votes
1answer
371 views

Does interrupt (for I/O and etc) requires support of Preemption? What is the relation between interrupts and Preemption in O.S?

So i just don't understand the relation between interrupts and Preemption in O.S? For example in Multi-programming, do we need the support of Preemption or not? when a process needs I/O and sends an ...
11
votes
2answers
233 views

Why doesn't playing audio stop other tasks?

If processors can only execute one thing at a time, how come I can play music continuously and still be able to run other tasks? I understand the interrupt system, but isn't it needed that CPU ...
1
vote
2answers
50 views

Beginnings of multiptogramming and compilations for it

I want to know how the first programs to be able to execute more than one programs within a common time span were like . I went through the history of the topic and it seemed like Strachey was the ...
1
vote
0answers
151 views

Processor consistency and cache coherence

Consider this example from Wikipedia: ...
2
votes
0answers
135 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 ...
5
votes
1answer
6k views

What is meant by superlinear speedup? Is it possible to have superlinear speedup in practice?

In parallel computing, I know the speed up equation is $$ \frac{1}{ s + \frac{1-s}{p} } $$ But what is meant by superlinear speed up? Is it something theoritical? Could you explain it with ...
2
votes
1answer
3k views

Multi-threading vs. Interrupt Handlers

In Arduino's architecture, multi-threading is not supported. However, interrupt handlers are being used as "placebo/replacement" if you may. However, I am not quite sure how these interrupt handlers ...
44
votes
7answers
11k views

Is there anything that MUST be done on a multi-core CPU?

When considering how multi-thread-friendly our program must be, my team puzzled about whether there's anything that absolutely cannot be done on a single-core CPU. I posited that graphics processing ...
0
votes
1answer
111 views

Rate Monotonic First Fit vs. Rate Monotonic Next Fit vs. Proportionate Fair

What would an example of a set of tasks be, where RMFF, RMNF and P-Fair all result in a different number of processors required?
2
votes
0answers
627 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: ...
0
votes
1answer
70 views

What is extra thread for idle time

Here http://tomstechnicalblog.blogspot.com/2016/02/rxjava-understanding-observeon-and.html I've found a sentence which I do not understand: If you have a quad-core, you can optimally support 5 ...
8
votes
2answers
768 views

Why can't fibers utilize multiple processors?

It seems that the distinction between fibers and threads is that fibers are cooperatively scheduled, whereas threads are preemptively scheduled. The point of the scheduler seems like a way to make an ...
3
votes
1answer
2k views

What is a student process?

According to Galvin and Silberschatz, 5 queues are maintained in multilevel queue scheduling, each for: System Process Interactive Process Interactive Editing Process Batch process Student Process ...
2
votes
1answer
136 views

Is the consensus number of SetAgree(3, 2) 2 or 1 (proof needed)?

SetAgree(n, k) An object that allows n threads to propose() n values. It guarantees Each thread will decide() on a (single) value. The cardinal number of the set of all values decided on is lower or ...
4
votes
1answer
90 views

How are userland programs executed?

Say we have a simple OS with a filesystem, and some programs on that filesystem. How then does a program get executed by the OS? My understanding is that the executable file gets loaded into memory, ...
3
votes
2answers
135 views

Where is the OS when a process is running?

We know that operating system is responsible for handling memory allocation, process management etc. CPU can perform only one task at a time(assuming it to be single core). Suppose an operating system ...