Questions tagged [threads]
The threads tag has no usage guidance.
20
questions with no upvoted or accepted answers
4
votes
0
answers
302
views
Mutex implementation on top of a preemptive scheduler that does not guarantee liveness
I'm implementing some synchronization primitives in the standard library of an operating system. Specifically, I want to implement mutexes and condition variables. This is on top of a microkernel with ...
2
votes
0
answers
33
views
What does it mean by "consistent view of memory" in lock-free dequeue implementation?
I am currently reading this paper by Chales-Lev. This paper explain an implementation of work-stealing dequeue. The part where I don't understand is in the implementation of steal operation.
...
2
votes
0
answers
334
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 ...
2
votes
0
answers
89
views
Context switching in M:N threading models?
I wanted to know how M:N kernel user thread model handles context switching, between multiple khread and pthread. How does the PCB/TCB for process and threads look like, how is state of registers ...
1
vote
0
answers
26
views
Thread wait state due to a cache miss
I know that a thread in a "running" state is put in a "wait" state if the thread itself needs I/O operation. Now I'm asking if even a cache miss implies that a thread is put in a &...
1
vote
0
answers
29
views
1
vote
0
answers
26
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
159
views
How is switching among user-level threads realised in the user space?
This is with respect to user-level threads where the kernel only knows about the process as a whole, and threads are created and maintained in the user space. Each thread has its PC, registers, stack ...
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
30
views
User-level threads and information available to the kernel
User-level threads are transparent to the kernel. How is htop able to show user-level threads running on my system? I know that those threads are user-level threads ...
1
vote
0
answers
64
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 . ...
1
vote
0
answers
59
views
Is a single starved process considered deadlocked?
In regard to the critical section problem, an algorithm that switches between allowing one of two processes, P1 or P2, to complete their critical section would cause starvation for P1 if P2 stayed in ...
1
vote
0
answers
558
views
Do user level threads take advantage of multi processing?
I asked this question here on stackoverflow, but maybe because of off-topic over there, it didn't received proper response.
Does user level threads take advantage of multiprocessing ? I read one such ...
0
votes
0
answers
18
views
How is CPU timesharing working when I launch nested tasks
I launch 3 tasks, each of them using 4 threads. Those 3 tasks each launch a single subtask using 6 threads, each. Both the upper level 3 tasks and 3 subtasks are resource-heavy.
And I have a 6 core, ...
0
votes
2
answers
102
views
What are the examples of multi-threading in a web server?
So I’ve been reading about multi-threading these past few days. Can you give me a real life example where the multi-threading might be used in a REST API web server?
0
votes
1
answer
77
views
Why is it not a good idea to branch a thread outside of a parallel region while other threads are still executing?
Say I have $n$ threads executing in a parallel region and one of them leaves the parallel region when others are still continuing to execute in the parallel region. Why this is a $BAD$ idea? For ...
0
votes
0
answers
14
views
parallelized data structure
I'm searching a data structure that supports O(1) concurrent insertions (thread number is known in advance) and iteration over its elements (insertion order doesn't need to be preserved).
While one ...
0
votes
0
answers
176
views
Can many threads run in a parallel in many-to-one model?
The book I am reading suggests that in a many-to-one multi-threading model, the threads are unable to run in parallel in a multi-core system.
I am thinking this is not the case because if we have many-...
0
votes
0
answers
184
views
Algorithm to construct timeline graph with arrival and departure times
So I am trying to construct a timeline graph for threads interacting with synchronization functions e.g. pthread_mutex_lock.
I have the following information:
1- ...
0
votes
1
answer
185
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 ...