The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
41 views

Passing parameters to threads

in Programming language course my professor take an example. Suppose the following code: ...
-3
votes
0answers
11 views

How to solve out of bounds exception error? [closed]

I am having trouble with an out of bounds exception error and can't figure out the problem. I'm still new to to java. I don't know why its appearing like that. Below is my code: public class ...
2
votes
1answer
28 views

Is it possible to solve the critical section problem with an atomic subtract operation?

In my Operating Systems class, our professor asked us to solve the critical section problem with the following atomic operation: ...
7
votes
1answer
19 views

Why using Hyper-threading can lead to performance degradation

I have read it at various places like this, that Hyper-threading leads to performance degradation. I am unable to get why or how hyper-threading leads to degradation. Why it is so that even when ...
3
votes
1answer
151 views

How do locks work?

Suppose I have an application with two threads, which both use the same resource. Normally, a synchronized block keeps these threads from messing with the resource in a way the user doesn't expect. I ...
0
votes
1answer
49 views

Simulating a sequence of events concurrently subject to a happened-before partial order

I am building a strategy game where multiple units(5 - 20) is fighting each other in the same time. I have a logic part that calculate those actions for each turn, and than pass it to the game ...
6
votes
1answer
107 views

Inconsistent state of a lock

I'm reading The Art of Multiprocessor programming and trying to understand their concept of inconsistent locks. Specifically, on page 37, the definition 2.8.1 of an inconsistent lock is not clear to ...
1
vote
2answers
74 views

Time cost of thread creation

While creating an algorithm, the following question came up: In uniform cost, what is the time cost of a process that creates a thread? Is there a difference between creating a thread in a ...
0
votes
1answer
18 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 ...
0
votes
1answer
15 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
1answer
65 views

Is the way an OS schedule threads related to parallel computing?

From Wikipedia: Operating systems schedule threads in one of two ways: Preemptive multitasking is generally considered the superior approach, as it allows the operating system to determine ...
5
votes
1answer
90 views

Question about threads and locks

I am currently reading Fuss, Futexes and Furwocks: Fast Userland Locking in Linux and came across this quote: In a fair locking scheme the lock is granted in the order it was requested. This can ...
0
votes
1answer
33 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
1answer
35 views

If a thread containing main terminates, can another thread do anything?

I'm studying threads in C and I have this theoretical question in mind that is driving me crazy. Assume the following code: ...
0
votes
0answers
33 views

Implementing/approximating Belady's OPT for multithreaded environments (papers?)

I have the memory reference string for a multithreaded application and want to run this through a simulator which implements/approximates Belady's OPT page replacement algorithm. But what is the best ...
1
vote
2answers
47 views

Does splitting a process across 4 terminal windows decrease the time it takes?

Basically, I using an algorithm called 'miranda' to look at miRNA targets and it only runs on a single thread. It compares everything in one file against everything in another file, produces a file as ...
2
votes
1answer
58 views

How to express Rob Pike's classic Go Code presentation in Hoare's CSP Algebra?

At 15:30 in this talk (p13 of this presentation here) Rich Hickey mentions the formalisms available for reasoning about Communicating Sequential Processes. He then goes on to mention that these ...
-1
votes
1answer
69 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 ...
3
votes
3answers
70 views

Reasons for decreasing the number of threads in a parallel implementation

What are the reasons for decreasing the number of threads in a parallel implementation ? Assume that we have two implementations, the first one with 4 threads, and a second one with 8 threads, and ...
5
votes
3answers
143 views

Is it possible to prove thread safety?

Given a program consisting of variables and instructions which modify these variables, and a synchronization primitive (a monitor, mutex, java's synchronized or C#'s lock), is it possible to prove ...
1
vote
1answer
110 views

Process state in multi threaded process

What would be the process state in a multi threaded process, in which threads are in different states (running, waiting, blocked etc)
4
votes
1answer
578 views

How are threads implemented in different OSs?

I was reading Linux Kernel Development by Robert Love, where I came across this Linux takes an interesting approach to thread support: It does not differentiate between threads and normal ...