6
votes
How is async implemented natively?
Well, "async" is an umbrella term and different pieces of async, over different runtimes are implemented in different ways.
For network i/o typically such runtime would take advantage of ...
4
votes
Accepted
Can the operating system "break up" a memory allocation (Linux)?
If the process asks for 100MB, there has to be a contiguous 100MB free in the address space of the process (virtual memory), but those addresses can be mapped to non-contiguous pages of physical ...
4
votes
Feasibility of adding drivers to linux kernel
This is not a "philosophy of Linux", it's a fact of life: over time, new hardware is invented, and needs new software to interface with it. This is true of every OS, in proportion to the ...
4
votes
Accepted
Feasibility of adding drivers to linux kernel
I have question regarding Linux kernel, as far as I understand, to make Linux compatible with different machines and hardware, different device driver is added to the Linux
That is correct, but the ...
4
votes
Is it cleaner to decrement a sleeping process counter in the waking process or the woken process?
I'm not a parallelism expert, but here's what concerns me. If there are multiple producers, then there is a race condition by the > 0 test and the wake/decrement.
Let's say there is only one ...
4
votes
What does the inode point to in case of a device file other than the disk?
Of course this depends on the file system, but in traditional UNIX filesystems a device node contains a type indicator (block or character device) and a major and minor number. In the kernel, the ...
3
votes
What security practices do I employ when building a library that requires low level root access to certain devices and files?
The first thing you'll have to understand about the risks introduced by this design you have to consider what root can do that normal users can't.
A user in the root group can do a great number of ...
3
votes
How is async implemented natively?
In the context of io_uring, it's important to recognize that block device I/O operations are inherently asynchronous: requests are sent over PCIe or whatever bus, and some time later a response is ...
3
votes
Is it cleaner to decrement a sleeping process counter in the waking process or the woken process?
I don't know what language/library you're using here, but for most, you're working at least two levels of abstraction too low. For keeping a count and blocking when the count is too low, you would ...
2
votes
Accepted
Is it cleaner to decrement a sleeping process counter in the waking process or the woken process?
Is it cleaner to decrement the reader counter in the producer, after it does the waking, or the reader, after it wakes?
The cleanest code is code where you can read it and tell confidently if it is ...
2
votes
Can the operating system "break up" a memory allocation (Linux)?
Asking about RAM is wrong, what counts is address space. If your OS is using virtual memory (which is most likely the case), then the mapping of address space to RAM is arbitrary and can change at any ...
1
vote
Accepted
What does the inode point to in case of a device file other than the disk?
One thing you should understand is that the on-disk inode structure is rarely identical to the in-memory inode structure.
What data is stored in an on-disk inode depends on the filesystem. But yes, it ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
linux-kernel × 24linux × 6
operating-systems × 5
c × 4
kernel × 3
design × 2
git × 2
version-control × 2
concurrency × 2
linux-development × 2
design-patterns × 1
algorithms × 1
programming-practices × 1
licensing × 1
security × 1
refactoring × 1
multithreading × 1
android × 1
coding-standards × 1
clean-code × 1
compiler × 1
gpl × 1
learning × 1
memory × 1
frameworks × 1