58 votes

Is there anything that MUST be done on a multi-core CPU?

The question is: under what constraints? There are certainly problems where, if we ask the question "can we solve this problem on hardware X in the given amount of time", the answer will be no. But ...
Joey Eremondi's user avatar
48 votes
Accepted

Is there anything that MUST be done on a multi-core CPU?

If you don't care about the running time, anything you can do on a multi-core machine, you can do on a single-core machine. A multi-core machine is just a way of speeding up some kinds of ...
D.W.'s user avatar
  • 159k
17 votes

Is there anything that MUST be done on a multi-core CPU?

As other answers have pointed out, a single CPU can always emulate multiple CPUs by slicing time and playing the role of each virtual CPU. This emulation will certainly calculate the correct answers. ...
Nayuki's user avatar
  • 881
13 votes
Accepted

What is meant by superlinear speedup? Is it possible to have superlinear speedup in practice?

With equation: not really. Superlinear speedup comes from exceeding naively calculated speedup even after taking into account the communication process (which is fading, but still this is the ...
Evil's user avatar
  • 9,455
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 ...
gnasher729's user avatar
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 ...
Ariel's user avatar
  • 13.4k
8 votes

Is there anything that MUST be done on a multi-core CPU?

It's much harder to develop really nefarious data races with a single CPU. I mean, sure, you can pull off tearing between words if you interrupt a single CPU, but can you build exotic scenarios where ...
Cort Ammon's user avatar
  • 3,351
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'...
Kai's user avatar
  • 865
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 ...
Pseudonym's user avatar
  • 22.1k
4 votes

Is there anything that MUST be done on a multi-core CPU?

The other answers adhere to the limited view of parallelism as "distributed concurrency". This gives some answers: in a clean model of computation à la Turing, multiple cores do not offer an advantage;...
Raphael's user avatar
  • 72.4k
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 ...
ss09's user avatar
  • 96
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 &...
rici's user avatar
  • 12k
3 votes
Accepted

Multi-threading vs. Interrupt Handlers

Threads On a platform that supports multi-threading the threads run in parallel. That means that multiple threads can run at the same time. This depends on the numbers of cores the CPU makes available....
Johan's user avatar
  • 1,080
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 ...
Daniel Mroz's user avatar
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 ...
nano's user avatar
  • 166
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 ...
chi's user avatar
  • 14.6k
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" ...
Ran G.'s user avatar
  • 20.7k
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 ...
vonbrand's user avatar
  • 14k
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 ...
ajit's user avatar
  • 376
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.'s user avatar
  • 159k
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. ...
MR.-c's user avatar
  • 197
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. ...
ajit's user avatar
  • 376
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 $...
Koenig Lear's user avatar
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 ...
gnasher729's user avatar
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 ...
David Richerby's user avatar
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....
Kishan Kumar's user avatar
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): ...
Dmitri Urbanowicz's user avatar
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.'s user avatar
  • 159k
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 ...
chi's user avatar
  • 14.6k

Only top scored, non community-wiki answers of a minimum length are eligible