9
votes
Why doesn't playing audio stop other tasks?
40 years ago, you might have had a computer where the CPU controlled the speaker directly. Those times are over, long ago.
You may have a computer with a primitive sound card. Such a sound card will ...
9
votes
Accepted
Why doesn't playing audio stop other tasks?
Since the CPU works in fixed clock cycles, nothing is really continuous, only seems so because the discretization is sensitive enough.
Suppose your CPU clock rate is $1\text{GHz}=10^9Hz$. If the CPU ...
6
votes
Accepted
Help understanding Petersons Algorithm for N Processes
The rough intuition is that at least one contending process becomes stuck at each step of the stairway to heaven (AKA the critical section) when there are enough contenders present. Consequently there'...
5
votes
Accepted
Reason that integers are used for priorities instead of float
Historically, floating point has been slower than integer arithmetic, though this has not been the case for about 20 years on most non-embedded architectures.
The more compelling reason is to optimise ...
4
votes
How does a dual core microprocessors run so many programs?
It's great that you're curious. A simplified explanation follows with a few links to delve into:
All of the programs running in parallel is actually an illusion that is created by the OS.
Even if we ...
3
votes
Is the kernel loaded into memory for every user simultaneously using a Multi-User O.S. system?
The shell (or window manager) which provides a visual interface is not part of the kernel. It's a simple user process and it runs in userspace without elevated privileges. In order for the user to &...
3
votes
Accepted
Why does parallelising slow down this simple problem against looping through all the data?
Parallelism has costs. The processes have to be scheduled, communicate with each other, manage resources, etc. In return you can do multiple things at the same time.
When you have a lot of slow tasks ...
2
votes
Accepted
What does an "I/O Task" mean?
Reading / writing from disk.
Reading / waiting for keyboard / mouse input.
Reading / waiting for network data.
Printing a page.
Basically, as the text says, an I/O task is anything which the CPU ...
2
votes
How does the cpu know which process to wake?
TL;DR
The CPU doesn't know anything. The operating system (OS) knows it all.
The CPU is rather a stupid machine that activates one instruction at a time, without knowing what that instruction "means" ...
2
votes
Accepted
Estimating P in Amdahl's Law theoretically and in practice
Amdahl divided a program in two parts, serial and parallel, and assumed each processor to have same compute ability. This concept has been further refined by Hill and Marty Amdahl's law in multi-core ...
2
votes
Is the consensus number of SetAgree(3, 2) 2 or 1 (proof needed)?
We can prove that 2-set-consensus among 3 processors (noted (3,2)) cannot be used (together with registers) to solve consensus among 2 processors (noted (2,1)) using the Borowsky-Gafni simulation (BG ...
2
votes
Accepted
Overhead cost of spawning child processes
The (non-negligible) cost is the set up of the in-kernel structures to keep track of the new process (setting up page tables and so on).
You can easily measure it: Write a small program just like the ...
1
vote
Desktop computing: who needs multi-threading, multi-processing; and how much?
CPUs with lots of cores are commonly used on servers that handle lots of separate requests, such as web servers. If I am loading one page and you are loading a different page (or even the same page), ...
1
vote
Desktop computing: who needs multi-threading, multi-processing; and how much?
Any CPU-intensive application that supports parallelization may be able to fully utilize such a processor. Such applications may range from simulations run by academics (especially where you may not ...
1
vote
Are there any operating systems that utilize only user threads?
There might be some research OS's for embedded systems that use only user threads, but I'm not aware of any production systems right now. The challenge is that you can't get security/isolation for ...
D.W.♦
- 164k
1
vote
Is the kernel loaded into memory for every user simultaneously using a Multi-User O.S. system?
The multi-user operating system is also a single machine which is desiged to allow multiple users to connect to it at the same time. so you can imagine it as a unix server and users have access to it. ...
1
vote
Cores, threads and sockets: what does it mean the calculation $T = tcs$ and the number on windows task manager performance?
There are two kind of threads, hardware and software threads. The threads number shown in red box is the number of software threads. The threads calculated above(16) is the number of hardware threads.
...
1
vote
Accepted
Thread - contention vs race
These are two distinct phenomena. Contention refers to the fact that when thread $A$ has accessed a resource $B$ needs to wait until $A$ frees it.
Race refers to the fact when both threads $A$ and $...
1
vote
Calculation of speed up of a program executed in multi-threaded system
Say you have 100 units of work. 30 units are such that only one core can be used while performing that unit of work. 70 units are such that four cores each can perform one unit of work at the same ...
1
vote
multithreading - duration of jobs
I don't get where the 0.375 came from ?
If the CPU utilization is 75%, and it's shared equally between two process, each of them gets 37.5%.
What are CPU minutes?
A CPU-minute is the amount of ...
1
vote
Skip List estimate number of elements less than (or greater than) a value
It is possible to extend skip lists with so called "width of the link". For each link it says how many elements are skipped by follow this link. From Wikipedia (section Indexable skiplist):
...
1
vote
Skip List estimate number of elements less than (or greater than) a value
Based on your comment, it sounds like you would also prefer a solution that is not too difficult to understand or implement.
I would suggest a persistent binary tree as one possible approach. Take ...
D.W.♦
- 164k
1
vote
Accepted
Concurrency and fairness
Suppose you are running two concurrent processes (or threads), which both perform intensive disk I/O. Both repeatedly attempt to read/write on some file.
Now, the scheduler must decide which requests ...
1
vote
Does interrupt (for I/O and etc) requires support of Preemption? What is the relation between interrupts and Preemption in O.S?
For Multiprogramming you may or may not need Preemption. It depends upon the scheduling policy that is being used. For example First in First Out is non preemptive but shortest CPU burst is preemptive....
1
vote
Beginnings of multiptogramming and compilations for it
The early multiprogramming systems ran two or three programs simultaneously in a single computer. They did so by partitioning the memory amongst
operating system
one user-program
another user-program
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
multi-tasking × 49threads × 12
operating-systems × 11
parallel-computing × 10
concurrency × 8
process-scheduling × 7
algorithms × 6
cpu × 6
os-kernel × 3
runtime-analysis × 2
programming-languages × 2
computation-models × 2
efficiency × 2
scheduling × 2
synchronization × 2
shared-memory × 2
multithreaded × 2
graphs × 1
time-complexity × 1
data-structures × 1
optimization × 1
terminology × 1
computer-architecture × 1
dynamic-programming × 1
artificial-intelligence × 1