Can a shared ready queue limit the scalability of a multiprocessor system?
What is the difference between interrupt and an event?
Can a shared ready queue limit the scalability of a multiprocessor system?
Simply put, most definetly. Read on for some discussion.
Tuning a service is an art-form or requires benchmarking (and the space for the amount of concepts you need to benchmark is huge). I believe that it depends on factors such as the following (this is not exhaustive).
So, if items are produced often, and if the amount of threads is large, and the processing time is low: the data structure could be locked for large windows, thus causing thrashing.
Other factors may include the data structure used and how long the data structure is locked for -e.g., if you use a linked list to manage such a queue the add
and remove
oprations take constant time. A prio-queue (heaps) takes a few more operations on average when items are added
.
If your system is for business processing you could take this question out of the picture by just using:
also note: synchronization primitives cause inter-processor cache-cohesion floods which are not good and therefore should be used sparingly.
The discussion could go on to fill a Ph.D dissertation :D
A per-cpu ready queue is a natural selection for the data structure. This is because, most operating systems will try to keep a process on the same CPU, for many reasons, you can google for.What does that imply? If a thread is ready and another CPU is idling, OS will not quickly migrate the thread to another CPU. load-balance kicks in long run only.
Had the situation been different, that is it was not a design goal to keep thread-cpu affinities, rather thread migration was frequent, then keeping separate per-cpu run queues would be costly.
What is the difference between interrupt and an event?
Recently, I have been asked a question in an interview what s the difference between a process and a thread. Really, I did not know the answer. I thought for a minute and gave a very weird answer. ...
This relates to some software I ve been given to "fix". The easiest and quickest solution would make it open and read 10 random files out of hundreds and extract some very short strings for processing ...
I know DLL contains one or more exported functions that are compiled, linked, and stored separately.. My question is about not about how to create it.. but it is all about in what form it is stored.. ...
I am wondering if i new some object but forget to delete it, when the process exit, will the leaked memory be returned to the OS?
Does the threads of a single process run in parallel on a multi-core machine on windows XP? Is the behavior same on different windows versions (windows server editions) I have heard that only threads ...
What are some of the major pro/con of FreeBSD vs GNU Linux vs OpenSolaris? Which is the best operating system to program/develop against?
How can I check OS version in a batch file or through a vbs in an Windows 2k/2k3 environment ? You know ... Something like ... : "If winver Win2k then ... or if winver Win2k3 then ....