151
votes
14answers
142k views

What is the difference between a process and a thread

What is the technical difference between a process and a thread? I get the feeling a word like 'process' is over used and there is also hardware and software threads. How about light-weight processes ...
65
votes
7answers
126k views

How to pause / sleep thread or process in Android?

I want to make a pause between two lines of code, Let me explain a bit : -> the user clicks a button (a card in fact) and I show it by changing the background of this button : ...
53
votes
10answers
17k views

Process vs Thread

Recently I have been asked question in the interview whats the difference between process and thread. Really I did not know answer. I thought for a minute and gave very weird answer. Threads share ...
38
votes
21answers
3k views

What is process and thread?

Yes, I have read many materials related to operating system. And I am still reading. But it seems all of them are describing the process and thread in a "abstract" way, which makes a lot of high level ...
19
votes
4answers
30k views

Async process start and wait for it to finish

I am new to the thread model in .net. What would you use to: start a process that handles a file (process.StartInfo.FileName = fileName;) wait for the user to close the process OR abandon the ...
16
votes
4answers
6k views

what is the difference between fork and thread

Can anyone explain the difference between a fork and a thread? Thanks
14
votes
7answers
4k views

Why should I use a thread vs using a process?

I'm a newbie at this so please forgive me for my ignorance. Separating different parts of a program into different processes seems (to me) to make a more elegant program then just threading ...
13
votes
1answer
1k views

What is the scope of finalizer thread - per application domain or per process?

Based on all my reading there should be one GC thread to invoke all finalizers. Now, the question is what is the scope of this "one" thread - per process or per application domain, as the whole ...
12
votes
4answers
9k views

thread context switch vs process context switch

Could any one tell me what is exactly done in both situation? what is the main cost each of them?
12
votes
2answers
13k views

Process.waitFor(), threads, and InputStreams

In pseudocode, here's what I'm doing: Process proc = runtime.exec(command); processOutputStreamInThread(proc.getInputStream()); processOutputStreamInThread(proc.getErrorStream()); proc.waitFor() ...
11
votes
2answers
1k views

Java Performance Processes vs Threads

I am implementing a worker pool in Java. This is essentially a whole load of objects which will pick up chunks of data, process the data and then store the result. Because of IO latency there will ...
11
votes
7answers
1k views

Is it safe to fork from within a thread?

Let me explain: I have already been developing an application on Linux which forks and execs an external binary and waits for it to finish. Results are communicated by unique to the fork + process shm ...
10
votes
4answers
687 views

Concurrency: Processes vs Threads

What are the main advantages of using a model for concurrency based on processes over one based on threads and in what contexts is the latter appropriate?
9
votes
1answer
1k views

Processes, threads, green threads, protothreads, fibers, coroutines: what's the difference?

I'm reading up on concurrency. I've got a bit over my head with terms that have confusingly similar definitions. Namely: Processes Threads "Green threads" Protothreads Fibers Coroutines ...
8
votes
4answers
1k views

How to simulate different CPU frequency and limit RAM

Hi I have to build a simulator with C#. This simulator should be able to run a second thread with configureable CPU speed and limited RAM size, e.g. 144MHz and 50 MB. Of course I know that a simulator ...

1 2 3 4 5 22
15 30 50 per page