Questions tagged [threads]

The tag has no usage guidance.

1
vote
1answer
363 views

processes response time confusion

An OS contains 10 identical processes that were initiated at the same time.Each process contains 15 identical requests. Each request consume 20 msec of CPU time.A request is followed by an I/O ...
1
vote
1answer
475 views

About hardware multithreading

I'm reading Multithreading (computer architecture) - Wiki, aka hardware threading, and I'm trying to understand the second paragraph: (p2): Where multiprocessing systems include multiple complete ...
1
vote
1answer
26 views

Why is there no one to many Multithreading Model?

I am studying various multi-threading models. Here the user threads are mapped to Kernel Threads. They are - ...
1
vote
1answer
21 views

Need to understand signals received vs sent

What is meant by in the following statement (from the paper titled "Implementing Lightweight Threads"): As in singlethreaded processes, the number of signals received by the process is less than ...
1
vote
1answer
44 views

Timing threads in an algorithm

This question relates to timing threads to go at a very precise rate. Consider the following scenario; A program creates a series of threads that continually add a random set of elements to their ...
1
vote
1answer
52 views

executing threads with no synchronization

suppose Threads 1 and 2 are executing concurrently with shared integer variables A, B, and C. Thread 1 executes:A=4, B=5, C=B-A; Thread 2 executes: A=3, B=6, C=A+B; I'm trying to find what can the ...
1
vote
0answers
21 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
0answers
32 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
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 ...
1
vote
0answers
18 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
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 . ...
1
vote
0answers
47 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
0answers
289 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 ...
1
vote
1answer
61 views

Local and Global storage with multithreading pools + locking threads

I am having difficulty answering the following questions relating to the use of threading. Question 1 is of relating to the possibility of a local storage per thread and a global storage accessible ...
0
votes
2answers
70 views

Why are threads called the unit of dispatch?

Threads called the "unit of dispatch" but what does that mean? I was looking over the web and two operating systems books but I can't find the answer. It seems that processes are defined by two ...
0
votes
1answer
106 views

Hardware thread context and register renaming

I'm having some issues understanding what happens on a context switch with the physical register file in an out-of-order CPU that implements context switching. Suppose that a CPU consists of 4 ...
0
votes
1answer
47 views

How do threads decide when to 'go'? [closed]

I have written some code that animates two boxes using HTML5 and JavaScript threads. I set them up to move at a fixed rate, which is the same: ...
0
votes
1answer
39 views

Does this lock have a name (related to reader-writer lock)

The object can be locked two different ways, where if the lock is entered the same way a second time, the lock is recursive, but if it's entered the other way, it blocks. Like a reader-writer lock, ...
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: ...
0
votes
1answer
30 views

Threads and Operating System

In a computer, the processor executes different threads and changes between them, the operating system is a program at the end that it´s being executed by the processor, there exists the posibility ...
0
votes
1answer
58 views

What do `i` and `Number` represent in the Bakery Algorithm?

I am studying the bakery algorithm, and I am unsure of what the variable i represents in it. I understand that Entering ...
0
votes
1answer
1k views

thread scheduling in multi core architecture

In multi core architecture, let us say we have M cores and N threads (N > M) and a process once assigned to a core can't migrate to another core's ready queue. We have to design scheduling policy to ...
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 ...
0
votes
0answers
34 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
37 views

Reason for thread pooling

Can someone explain what is the reason for thread-pooling in Linux, even if the threads are light to create and destroy??
0
votes
1answer
23 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
0answers
121 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
1answer
82 views

Is it correct to say that CPU's only compute threads?

New to the world of parallel computation. Would it be correct to say that CPU's are actually thread calculators? My understanding currently: a ...
0
votes
1answer
49 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 ...
-2
votes
1answer
555 views

2-core 2.6GHz vs 4-core 1.3GHz [closed]

If a process could run as much cores as available, which CPU is faster, a 2-core 2.6GHz CPU or a 4-core 1.3GHz CPU?