Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [threads]

The tag has no usage guidance.

21 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
311 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 ...
Gilles 'SO- stop being evil''s user avatar
2 votes
0 answers
34 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. ...
kevinyu's user avatar
  • 121
2 votes
0 answers
367 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 ...
Abhishek Dhankar's user avatar
2 votes
0 answers
90 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 ...
CodeWithPride's user avatar
1 vote
0 answers
32 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 &...
Bender's user avatar
  • 367
1 vote
0 answers
30 views

Race Condition in Mesa Monitor

...
zeitgeist's user avatar
  • 111
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 ...
James's user avatar
  • 11
1 vote
0 answers
169 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 ...
Duncan's user avatar
  • 11
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 ...
Paul's user avatar
  • 11
1 vote
0 answers
39 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 ...
narendraj9's user avatar
1 vote
0 answers
68 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 . ...
unnamed's user avatar
  • 65
1 vote
0 answers
61 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 ...
Adriankusiak's user avatar
1 vote
0 answers
585 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 ...
Barry's user avatar
  • 19
0 votes
0 answers
32 views

How do threads aid in execution of a program?

Firstly this is not a question about programming. A book I am reading on C programming explains briefly the steps of execution of a C program after its compilation. It states the following, To be ...
Quorthon's user avatar
0 votes
1 answer
75 views

How to find optimum number of cpu cores for a workload

Following bar graph shows maximum percentage cpu utilization of F16sv2 (16vcpu &32GB) azure virtual machine in last 30 days. Only sometimes CPU usage goes more than 60 percentage. How to find the ...
Amal's user avatar
  • 1
0 votes
2 answers
235 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?
Axel's user avatar
  • 101
0 votes
1 answer
83 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 ...
Turing101's user avatar
  • 1,200
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 ...
SomePerson's user avatar
0 votes
0 answers
241 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-...
jungleMan's user avatar
  • 101
0 votes
0 answers
192 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- ...
Dev2017's user avatar
  • 101
0 votes
1 answer
234 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 ...
Cobie Fisher's user avatar