Question

how can multiple threads run simultaneously on a single-processor system?  

how can multiple threads run simultaneously on a single-processor system?  

Homework Answers

Answer #1

Answer:---------

It can be done on a single-processor system, and in fact it's much easier that way. It works the same way as running multiple processes -- the kernel, via a timer interrupt or other similar mechanism, suspends one, saving its machine state, and replacing that by the previously-saved state of another -- the only difference being that two threads of the same process share the same virtual memory space, making the task-switch much more efficient.

Multi-threading on multi-processor systems is actually much more difficult, since you have issues of simultaneous access to memory from multiple CPUs / cores, and all the nasty memory synchronization issues that arise out of that.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Can a multithreaded solution using a multiple-level threads achieve better performance on a multiprocessor system than...
Can a multithreaded solution using a multiple-level threads achieve better performance on a multiprocessor system than on a single processor system? Explain
Consider a multicore processor with threads stopping for requests from a shared memory. Assume an average...
Consider a multicore processor with threads stopping for requests from a shared memory. Assume an average rate of 50 thread-originating requests for memory access per second. Assume an average request response time of 0.1 seconds. Use Littleā€™s law to calculate the average number of queued threads in the system during some relevant time. Show your work.
Why are threads not constrained to the number of processors available on a system? If I...
Why are threads not constrained to the number of processors available on a system? If I only have 4 processors (cores) soon a system, can I really benefit from having more than 4 threads? Explain please. When creating a thread using pthread_create, why does the function you pass take void * as its single argument and return a void *? Why not a char * or int *?
Is it possible for multiple firms to hold a competitive advantage in an industry simultaneously? Can...
Is it possible for multiple firms to hold a competitive advantage in an industry simultaneously? Can a firm have a competitive advantage and disadvantage simultaneously?
java thread question. Could you please give me a multiple thread program example that all threads...
java thread question. Could you please give me a multiple thread program example that all threads run in parallel?
How can we start moving towards a single-payer healthcare system, in other words, what could be...
How can we start moving towards a single-payer healthcare system, in other words, what could be done to promote this system?
how is genome size affected by the population size and how can multiple genes get packed...
how is genome size affected by the population size and how can multiple genes get packed into a single region of a viral genome?
Assume several processes are running concurrently on a single processor system. Assume also that at time...
Assume several processes are running concurrently on a single processor system. Assume also that at time 2, P1 is running, no system resources (other than the CPU and memory) are being used, and that no process is in a blocked state waiting for an event to occur. Consider the following events: At time 3: P1's time slice expires At time 6: P2 is dispatched and given the CPU At time 7: P2 executes a command to read from disk unit...
In electrophoresis, can multiple pure bands be indicative of a single protein with several domains? I...
In electrophoresis, can multiple pure bands be indicative of a single protein with several domains? I know it can be indicative of different subunits of a complex.
You have a large inventory of Intel processors that run at 3 GHz and 1 Volt,...
You have a large inventory of Intel processors that run at 3 GHz and 1 Volt, and consume 100 W (of which, 20 W is leakage) when running a given CPU-bound application. This application finishes in 100 seconds on this processor. The processor is capable of DFS and DVFS, but cannot reduce its voltage under 0.9 V. A customer places an order for motherboards that have inexpensive cooling and power delivery that can only handle a processor that runs at...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT