Hacker News new | ask | show | jobs
by professor_v 895 days ago
This whole article is terribly confusing. Take this paragraph for example:

Now, your process might depend on other system resources like input and output; as this event is also a process, it also has a file descriptor, which will be attached to your process in the file descriptor table.

What event? Are input and output an event? Why is this event its own process? Input and output are not a process are they?

Also, does a process have its own file descriptor table? That was never mentioned before and this reads like it is already known.

This sort of stuff goes on in my head throughout the entire article...

It's also still unclear to me what happens if multiple processes try to access the same file. Do file descriptors help to lock files during writing?

2 comments

The writing style just sucks and it reads like a LinkedIn post with every sentence in its own paragraph. It tries to be approachable, but it uses blurry undefined terms and overly-simplistic analogies.
This “language” is all over the place:

Starting with 101, 102 in the first example, for some reason.

When a process or I/O device makes a successful request, the kernel returns a file descriptor to that process

I/O device?

By default, three types of standard POSIX file descriptors exist in the file descriptor table

Types?

Apart from them, every other process has its own set of file descriptors, but few of them (except for some daemons) also utilize the above-mentioned file descriptors to handle input, output, and errors for the process.

What?

It makes an impression of a poor translation of a pretty low-effort article, tbh. You’re better off just reading the corresponding APUE section, which you must have read anyway.

Could an LLM have been involved in writing those sentences?