BagOfPistchios
|
7 years ago
|
on: Rust at speed – building a fast concurrent database [video]
As I understand it, it achives lockfree reads by having two caches: One for modifying and one for reading, and atomically swaps them after modifications (and applies the changes to what was previously the read cache).
Am I missing something or doesn't this reduce the overall memory available for cache by a factor 2x?
BagOfPistchios
|
7 years ago
|
on: Rust at speed – building a fast concurrent database [video]
Yes you need both compiler barriers for the ordering, as well as memory fences to ensure the global visibility of previous operations in order.
It is possible that the mutex implementation he used does no spinning in case of contention and just context switches each time. That could explain the poor performance of mutexes but I don't know the implementation.
BagOfPistchios
|
7 years ago
|
on: There’s a Hole in the Bottom of the C: Effectiveness of Allocation Protection [pdf]
The const keyword really doesn't mean anything. It is not checked at runtime, so a buffer-overrun could change the const member regardless
BagOfPistchios
|
7 years ago
|
on: HermitCore-rs – A Rust-based, lightweight unikernel
That was my point - a lot more people know C
BagOfPistchios
|
7 years ago
|
on: HermitCore-rs – A Rust-based, lightweight unikernel
It may or may not be easier to "maintain and extend" a Rust implementation, but it will surely be even easier to find people to do those things if they keep it in C.
EDIT: Rephrased the sentence
BagOfPistchios
|
7 years ago
|
on: Timercpp: JavaScript-like setTimeout and setInterval for C++
agreed, it is dangeorus if newbies try to use this
BagOfPistchios
|
7 years ago
|
on: Pause/unpause any X11 application
The only times I have ever wanted to freeze an application it was for the purpose of it not hogging CPU time in favor of some interactive program, and had no better way of doing that.
On Linux, the Con Kolivas MuQSS CPU scheduler introduces a new scheduling policy called SCHED_IDLEPRIO which runs a program only if there is absolutely nothing else to run. It is perfect for long-running programs that don't need interactive performance.
EDIT: The example given in this article is also IMO better solved by using SCHED_IDLEPRIO
>Other example may be some heavy processing. For example you started RawTherapee or Darktable processing of large amount of photos and you are not able to smoothly watch a video. Just pause it, watch the video and unpause it again to finish its work.