HNHacker News
TopNewBestAskShowJobs

afr0ck

440 karma · joined August 9, 2019

Karim Manaouil

k.manaouil@gmail.com

submissionscomments
afr0ck··on The rxv64 Operating System: MIT's xv6, in Rust, for SMP x86_64 machines
"better" is subjective.
afr0ck··on ReiserFS is now “obsolete” in the Linux kernel and should be gone by 2025
Just out of curiosity, may I ask for which reason did you use ReiserFS v3 and on what kind of devices?
afr0ck··on Taos Operating System (1995)
Thanks for the details. It's interesting to know the differences between them. Yes, it looks like Inferno is the closes thing to Taos. My point was that there was a lot of interesting research operating systems that explored ideas in that direction (heterogeneity, distribution, networking, etc). But Taos seems super interesting. In what language is it written?
afr0ck··on Taos Operating System (1995)
Amoeba OS, Plan9 and Inferno OS explored the same stuff.
afr0ck··on Exploring the Internals of Linux v0.01
The Amoeba distributed operating systems, from Andrew Tanenbaum.

The distribution also includes Amake, a parallel version of Make.

https://archiveos.org/amoeba/

afr0ck··on I'm Peter Roberts, immigration attorney who does work for YC and startups. AMA
Very insightful! Thanks very very much Peter!
afr0ck··on I'm Peter Roberts, immigration attorney who does work for YC and startups. AMA
I am an Algerian citizen who is currently doing PhD studies in computer science in the UK. My area is systems and computer architecture.

The job market in the UK in my area is very slim I can't find the type of jobs I would like to do. That's the reason for me why I want to move to the US.

What are the possible routes that I can possibly take to immigrate to the US?

afr0ck··on Building and operating a pretty big storage system called S3
Linux has FUSE, which is a framework to develop user-level filesystems. Mounting S3 buckets is a very good use case. Sshfs and httpfs are more or less similar in this regard.
afr0ck··on Best books, courses to learn fundamental concepts on Operating Systems?
Read source code.
afr0ck··on Japan loses No. 1 spot in powerful passport rankings
Try having an Algerian passport; travelling is a distant dream.

Growing up as a kid in Algeria, you just accept the fact that you don't have the right to visit and see other places in the world; very depressing.

afr0ck··on We replaced Firecracker with QEMU
KSM is a Linux kernel feature, not directly related to KVM.
afr0ck··on Are You Sure You Want to Use MMAP in Your Database Management System? (2022)
I don't know what you're talking about, but msync() flushes only the pages in that range. The pages are in the page cache (on Linux, it's a per-file xarray [1] of pages). Once all the dirty pages in the range are located, they go through the filesystem to be mapped to block numbers and then submitted to the block layer to be written to the storage device. Only the disk blocks mapped to the pages in that range will be written.

Source: I'm a Linux kernel developer.

[1] https://docs.kernel.org/core-api/xarray.html

afr0ck··on Are You Sure You Want to Use MMAP in Your Database Management System? (2022)
msync() affects only the pages that part of the mmap area you ask for in the arguments. From the man pages:

> int msync(void addr[.length], size_t length, int flags);

> msync() flushes changes made to the in-core copy of a file that was mapped into memory using mmap(2) back to the filesystem

afr0ck··on Are You Sure You Want to Use MMAP in Your Database Management System? (2022)
Linux throws a SIGBUS. A process should anticipate such I/O failures by implementing a SIGBUS handler, especially a database server.

For the second part of your comment, on Linux systems, there is the msync() system call that can be used to flush the page cache on demand.

afr0ck··on Are You Sure You Want to Use MMAP in Your Database Management System? (2022)
On Linux, it's a SIGBUS.
afr0ck··on Towards an adaptable systems architecture for memory tiering at warehouse-scale
Not necessarily. A page on a remote NUMA node is mappable, but with slower access. The system needs to smartly choose what pages to put there and when to migrate them back for performance and balancing. CXL memory nodes are mappable as well. Zswap is not, but needs to only be decompressed in RAM, in contrast to the disk pagefile where you need to block and read from the terribly slow disk. Protecting process workingset, choosing what pages need to be where at every given point in time without degrading performance while maximizing memory utilisation and reducing memory costs at a Google infra scale is a super super tough challenge.
afr0ck··on Linux Namespaces Are a Poor Man's Plan 9 Namespaces
mmap() is very different in its semantics from read() and write(). The latters have a clear, precise definition, a byte stream received by your file driver. mmap() is a different beast, it can be a ring buffer, it can a spinlock, it can be anything. The moment you have mmap(), the "eveything is a file" model is already broken and the namespace API can longer work reliably over the network. How would you transport an mmap() over the network? if /dev/tcp in plan9 uses mmap to asynchronously write the packets, you can no longer rely on the 9p filesystem protocol to implement a proxy by mounting the remote computer's /dev/tcp, because there is no clear and reliable way to map remote memory. It's no more about transporting a random sequence of bytes to another computer. You need more than that to make it work. It's just one example where this "everything is a fike" model is overly simple for the harsh real world.
afr0ck··on Linux Namespaces Are a Poor Man's Plan 9 Namespaces
The simple, everything is a file, model of Plan9 is what makes the namespaces API as clear and as general as it is. All the objects export the same file API. Every interaction with the OS objects is done through file open, create, read, write, etc. But it has it's drawbacks.

First, it's not always easy to map every object operation into either an open read or write. With time, we should have seen a lot of ugly interfaces resulting from this limitation.

Second, hardware progress, the web, etc., introduced a lot of heterogeneity and complexity. People could no more keep up with simple general designs. And to squeeze every bit of performance, everyone was doing things different based on the hardware and the workloads. They use whatever makes their software, drivers, and OS objects work as fast as they could.

And this is how we ended with the extreme fragmentation and heterogeneity we have in Linux, which explains the complex and less general implementation of its namespaces and its other features.

Edit: fix typos

afr0ck··on Linux Namespaces Are a Poor Man's Plan 9 Namespaces
If I remember correctly, they have similar concurrency models. They were both written the same author as well, Rob Pike.

Edit: fixed a typo

afr0ck··on A Linux kernel without struct buffer_head
It will certainly take a couple of years before it's completely removed. This is just a first step.
afr0ck··on An introduction to lockless algorithms (2021)
You don't have to disable IRQs if the spinlock is never taken by an interrupt handler. Disabling preemption would be enough in such a case, and that reduces latency issues related to disabling IRQs.
afr0ck··on Can PL theory make you a better software engineer?
I once did a distributed systems internship. I am a very pragmatic low-level kind of person. Abstraction is very hard for me to process if I can't see how it manifests in real life. There was a senior PL guy in the team and he was literally modeling every problem according to PL theories. He sees everythings as algebraic structures and tries to explain everything in terms of state machines, parsing, interpreting,etc. My job was a very low level distributed networking where I need to work on Linux kernel networking stack and virtual networking techniques and software (tap/tun devices, VPNs, etc). I just could not work with that guy. I am thinking in terms of IP addresses, network devices, packets and memory pages over the network, but he was thinking in terms of algebra and parsing. I could not properly communicate with him and I had extremely hard time to translate and map his modeling theory to the actual tools and processes I need to do the job. He was senior and had much more influence than me in the team. I ended up quitting the team because of the huge gap in terms of problem modeling and thinking process.
afr0ck··on C++ Initialization Story
I can't believe a 300 pages book is needed to just talk about initialisation in C++!!! Now I understand why Linus refused this craziness in the Linux kernel. I genuinely believe that C++ is just a toxic wasteland of time. It's not even that productive, fun to work with or secure. I would take C, Rust, Golang, Python anywhere, anytime.
afr0ck··on Why do older grad students become bitter?
Man, I'm sorry to break it to you in this way, but it's up to you to make your life and research interesting. Don't waste time with the bullshit. Try to solve real problems and work towards concretising them.
afr0ck··on RISC-V Business: Testing StarFive's VisionFive 2 SBC
Does this board have virtualisation technology?
afr0ck··on Thoughts on what a next Rust compiler would do
Sometimes, you can't make hard walls between subsystems. Some filesystems need very close interaction with memory management to have very good performance. Some objects are accessed and manipulated in a racy way from logically independent places for scalability reasons. I am not against Rust, modularity, etc. But building very high performance systems is just something different.
afr0ck··on Thoughts on what a next Rust compiler would do
If you want blazing fast and very scalable performance, you have to do that. Multiple independent contexts in the kernels can have a reference on certain objects and manipulate them concurrently with relaxed consistency. It would be very impractical to hard-protect certain parts of those objects and guarantee serial consistency. For scalability and performance reasons, certain data structures, objects or certain parts of certain objects could be accessed in a inherently racy manner, but guaranteeing correctness in the existence of races is extremely hard. Any attempt for modularisation, message passing or serial consistency would make your kernel look like a joke compared to Linux. It would make the interaction between subsystems easy but would not provide the opportunity for very fast low latency execution.
afr0ck··on Thoughts on what a next Rust compiler would do
In real world software, you need lots of freedom in order to design high performance scalable systems. This includes using non-trivial data structures, and being able to access and organise memory in subtle ways. The Linux kernel is an example of this. Look at the reclaim subsystem in the kernel, for instance, and how it interacts in subtle and very complex ways with various other subsystems, the page cache, the generic block layer, the memory control groups, the VFS and the filesystems. All of them are multi-threaded and run on complex high performance CPUs performing memory re-ordering, speculative execution, branch perdiction and parallel execution of both processes and instructions. You really need extremely smart smart data structures and organisation and very smart algorithms to manage the concurrency. C is a language where you have all that freedom to do whatever you want leading to high performance and low latency. In Rust, you can't even safely implement a doubly linked list. Now, if you have to use unsafe every time you need high performance or scalable data structures, then Rust is as unsafe as C and it's just making your life harder for no reason, except hype.
afr0ck··on I've procrastinated working on my thesis for more than a year
Mind boggling. I wrote my Masters thesis in one week. Mind you, it's computer science (I did some work on distributed systems and contributed to the Kubernetes container orchestrator), the professors don't stress that much on the writing as long as you did a valuable work. However, I also saw that as a waste of time, so I was just trying to get rid of it asap and write whatever. It's shocking when I hear people procrastinating for years for such a useless thing.
afr0ck··on Ask HN: What would you do if you didn't have to work?
I feel like you are describing me. I speak four languages. I love engineering and building stuff, but I have a limitless love to nature and the outdoors, hiking, biking, swimming in the wilds, hunting, and I love Deserts and mountains.
← PreviousPage 3 of 6Next →