Live data from Hacker News

Two Objects Not Namespaced by the Linux Kernel (2017)

blog.jessfraz.com

41–50 of 59 posts

Re: Two Objects Not Namespaced by the Linux Kernel (2017)

#41

You can't change time in container, but it's possible to change timezone files. With generating fake timezones it is possible to change time in container.

This doesn't change what gettimeofday(2) gives you (and actually you can't even use ptrace easily to fake the time of day because gettimeofday(2) isn't a real syscall -- it's actually implemented as a read from the vDSO page the kernel maps into every process).

Re: Two Objects Not Namespaced by the Linux Kernel (2017)

#42

Earlier quoted context omitted.

In Windows NT, everything is an object. This is derived from VMS, which is essentially NT's predecessor (a principal designer of both being David Cutler of Digital Research and later Microsoft).

The problem I always had with this was that Windows has this whole layer of objects and what might even be elegance in places all hidden under the hood, and unless you're a C++ hacker you can't actually work with most of it. CMD and the GUI tools never exposed half of it to you; Powershell helps, but it's all still very hidden and hard to get to. In comparison, Unix provides all the tools needed to take it apart and…

Yeah, as a person who hates Windows and loves all things unix, the NT kernel and underlying system have long struck me as a well-designed, nice system... with a poor userland and a terrible UI on top. But the kernel is nice.

Re: Two Objects Not Namespaced by the Linux Kernel (2017)

#43
post #7

I wonder whether namespacing time would also result in those namespaces being able to have separate "clocks" (time backends? time schedulers?) that progress at different rates, or for different reasons. Being able to put a process into a time namespace with a deterministic "clock" would obviate a large benefit of http://www.zerovm.org/ . Also, having "clock slew" be a matter of perspective—with processes that can han…

Couldn't that just be done as part of libfaketime? Now granted it's harder to do an entire OS with that but you could run it within a VM that itself is run by libfaketime, no?

Re: Two Objects Not Namespaced by the Linux Kernel (2017)

#44
post #3

Since this was written a time namespace was proposed: https://www.phoronix.com/scan.php?page=news_item&px=Linux-Ti...

This proposal implements clock offsets, but does it support continuous time scaling? One clock-handy use case would be to run your programs really slow or fast (or backwards!), for testing purposes. Kaleida Lab's ScriptX (a multimedia programing language kinda like Dylan with classes) had built-in support for hierarchal clocks within the container (in the sense of "window" not "vm") hierarchy. The same way every wind…

This proposal implements clock offsets, but does it support continuous time scaling? One clock-handy use case would be to run your programs really slow or fast (or backwards!), for testing purposes.

What use-case would you have for this? Making sure your program runs properly in the near presence of a black hole?

Re: Two Objects Not Namespaced by the Linux Kernel (2017)

#45
post #38

Earlier quoted context omitted.

This proposal implements clock offsets, but does it support continuous time scaling? One clock-handy use case would be to run your programs really slow or fast (or backwards!), for testing purposes. Kaleida Lab's ScriptX (a multimedia programing language kinda like Dylan with classes) had built-in support for hierarchal clocks within the container (in the sense of "window" not "vm") hierarchy. The same way every wind…

> This proposal implements clock offsets, but does it support continuous time scaling? No. The main reason why is because it's very difficult to do with the current time-keeping machinery within the kernel. Some people also want the ability to freeze the current time, which is also similarly difficult -- and in some cases harder because then what should CLOCK_MONATONIC give you? There's also the fact that there's cur…

You mean "CLOCK_MONOTONIC", not "CLOCK_MONATONIC". (I'm guessing this is a misspelling, not a typo, since it appeared twice.)

And the simple answer is that if time stops then CLOCK_MONOTONIC always returns the same time. This is perfectly fine given correct software; CLOCK_MONOTONIC is guaranteed to not go backwards but it it not guaranteed to always go forward. One could imagine for example a system with a very inaccurate clock where CLOCK_MONOTONIC simply counts days, for example.

Re: Two Objects Not Namespaced by the Linux Kernel (2017)

#46
post #44

Earlier quoted context omitted.

This proposal implements clock offsets, but does it support continuous time scaling? One clock-handy use case would be to run your programs really slow or fast (or backwards!), for testing purposes. Kaleida Lab's ScriptX (a multimedia programing language kinda like Dylan with classes) had built-in support for hierarchal clocks within the container (in the sense of "window" not "vm") hierarchy. The same way every wind…

This proposal implements clock offsets, but does it support continuous time scaling? One clock-handy use case would be to run your programs really slow or fast (or backwards!), for testing purposes. What use-case would you have for this? Making sure your program runs properly in the near presence of a black hole?

Your snark aside, clocks are not perfect, and a malfunctioning clock might speed up or slow down.

Also, speeding up the clock is a technique already used in testing enviroments [1].

[1]: https://github.com/majek/fluxcapacitor

Re: Two Objects Not Namespaced by the Linux Kernel (2017)

#47
post #20

> The current set of namespaces in the kernel are: mount, pid, uts, ipc, net, user, and cgroup. [...] [Time is] not namespaced. [...] The kernel keyring is another item not namespaced. I've always argued that "everything is a file" is an exaggeration. These moments make the extent of that exaggeration clear. If everything truly was a file, the only thing you would need to namespace is the filesystem. But in reality t…

You are 100% correct. “Everything is a file” was more of an early design insight, which was gradually abandoned as new features were added. There is a movement of “Unix purists” who lament this deviation from founding principles, and advocate for a return to them. The most notable example is Plan 9. In Plan 9, everything actually is a file. And exactly as you said, all resources are namespaced via the filesystem. It’…

It might have been elegant, but doing high performance graphics rendering wasn't something Rio was able to do.

Re: Two Objects Not Namespaced by the Linux Kernel (2017)

#48
post #37

> The current set of namespaces in the kernel are: mount, pid, uts, ipc, net, user, and cgroup. [...] [Time is] not namespaced. [...] The kernel keyring is another item not namespaced. I've always argued that "everything is a file" is an exaggeration. These moments make the extent of that exaggeration clear. If everything truly was a file, the only thing you would need to namespace is the filesystem. But in reality t…

Yeah, this was one of the headline changes in Plan 9 (the second OS made by the Fathers of Unix).

And improved in Inferno, which fixed some of Plan 9 flaws, the third OS made by the Fathers of Unix that HNers keep forgetting about.

Re: Two Objects Not Namespaced by the Linux Kernel (2017)

#49
post #40
post #11

Earlier quoted context omitted.

If there is one thing Y2K taught us, its to ignore any worry about the 2038 problem until 2036, then make a HUGE deal out of it. https://en.wikipedia.org/wiki/Year_2038_problem

Linux and glibc have been working on 2038 problems for at least the past decade.

There are plenty of other POSIX platforms out there.

Re: Two Objects Not Namespaced by the Linux Kernel (2017)

#50
post #25

Earlier quoted context omitted.

hm is NT a purer Unix than Unix then? After all, it has all its object in a filesystem-like tree...

In Windows NT, everything is an object. This is derived from VMS, which is essentially NT's predecessor (a principal designer of both being David Cutler of Digital Research and later Microsoft).

David Cutler developed VMS at Digital Equipment Corporation (DEC). Digital Research was a different company - it developed CP/M.
Post reply on HN