News for hackers. Stuff that matters.
Re:It's time to get the Posix elephant off our necks by simplotek on Wednesday February 22, 2023 @07:55PM (#34905379)
> I don't think he's wrong that the POSIX synchronous IO model isn't a great fit for modern hardware, though.

Opinions don't really matter. Solutions to real-world problems do.

To me, the fact that no one up to this day felt that the issues in this area was significant enough to warrant a fix or an alternative tells me that it's noise about nothing.

Re:It's time to get the Posix elephant off our necks by loeg on Wednesday February 22, 2023 @08:05PM (#34905459)
> To me, the fact that no one up to this day felt that the issues in this area was significant enough to warrant a fix or an alternative tells me that it's noise about nothing.

Do you not view io_uring or Windows IOCP as alternatives? Or the plethora of other non-POSIX IO extensions in Linux, such as splice and sendfile? SPDK and DPDK? There’s also Google’s Fuschia operating system, which is not Posix. I think it’s pretty clear that people are investing in a variety of alternative approaches.

Re:It's time to get the Posix elephant off our necks by PaulDavisThe1st on Wednesday February 22, 2023 @09:25PM (#34905932)
so what you're actually saying is that the POSIX elephant isn't (and hasn't been) actually standing on our necks after all?
Re:It's time to get the Posix elephant off our necks by foobarian on Wednesday February 22, 2023 @09:49PM (#34906094)
I mean if what they want is a better standard, so there can be a dozen compliant operating systems we can all compile our stuff for, then maybe.

To look at things from another angle, what if having had POSIX all these years actually made things more uniform, in the sense that we didn't have variance between systems as large as e.g. between a BSD Unix and a Lisp machine? What if that were our choices today. As it is the largest mainstream departure is maybe Windows.

Re:It's time to get the Posix elephant off our necks by jen20 on Thursday February 23, 2023 @09:00AM (#34910663)
None of the things mentioned are POSIX _or_ portable.
Re:It's time to get the Posix elephant off our necks by wahern on Wednesday February 22, 2023 @09:58PM (#34906156)
> io_uring or Windows IOCP

They're great tools but they're not great abstractions. If you use them directly for all I/O, then every application in every programming language will end up looking JavaScript, which even with Promises is quite ugly. Promises aren't new; language designers avoided them as best they could for decades because they suck as abstractions.

Languages like Go do a great job at providing abstractions, and tools like io_uring and IOCP are useful for implementing those abstractions. But they're not ideal, either, nor are they necessary. Their value is diminished. Note that both io_uring and IOCP are implemented internally using thread pools that perform synchronous operations, not much different from how Go works when using traditional BSD Sockets interfaces to implement its abstractions. io_uring and IOCP have access to some optimizations, but the basic model remains the same.

If you read between the lines (discussion of pthread complexity, emphasis on virtual memory, which is fundamentally blocking) I think the author is implicitly making the same argument--that better abstractions would make synchronous threading more efficient and easier, and these should be available as a basic application primitives, rather than relying on languages and third-party runtime engines to build atop more coarse-grained primitives, io_uring and IOCP included.

Re:It's time to get the Posix elephant off our necks by simplotek on Thursday February 23, 2023 @02:51AM (#34908000)
> Do you not view io_uring or Windows IOCP as alternatives?

I don't simply due to the fact that no one ever bothered to put something together on UNIX-like systems that resembles any of those options.

If anyone felt that those were worthy ventures, in these last few years we would already have seen something resembling that effort. But we haven't.

Re:It's time to get the Posix elephant off our necks by maccam94 on Thursday February 23, 2023 @04:09AM (#34908457)
> no one ever bothered to put something together on UNIX-like systems that resembles any of those options.

What do you mean? io_uring is a Linux kernel interface, and there are several userspace projects that are building upon it.

Re:It's time to get the Posix elephant off our necks by jcelerier on Wednesday February 22, 2023 @10:02PM (#34906192)
> To me, the fact that no one up to this day felt that the issues in this area was significant enough to warrant a fix or an alternative tells me that it's noise about nothing.

yes, let's just ignore the mountains of people who end up literally reimplementing complete network stacks in userspace to handle events in a modern way

Re:It's time to get the Posix elephant off our necks by simplotek on Thursday February 23, 2023 @02:54AM (#34908017)
> yes, let's just ignore the mountains of people (...)

Who are they, exactly, and why haven't anyone from that mountain thought it would be a worthy investment of their time to pull it off?

I see you complaining that people have to implement things, but why has no one ever implemented the thing you perceive to be so invaluable?

Re:It's time to get the Posix elephant off our necks by maccam94 on Thursday February 23, 2023 @04:12AM (#34908474)
Because usually they are implementing a subset of the network stack that meets their needs for communication within their internal network. Porting the entire kernel stack that actually handles all of the complexities and quirks of the open internet is a larger task than they needed to tackle.
Re:It's time to get the Posix elephant off our necks by Karrot_Kream on Thursday February 23, 2023 @04:17AM (#34908498)
People/projects can and do implement userspace networking stacks. For example, gVisor implements its own userspace networking stack [1] isolated from the kernel networking stack.

[1]: https://gvisor.dev/docs/user_guide/networking/