4 ms·
For inspiration, have a look at the plan 9 syscall table: http://aiju.de/plan_9/plan9-syscalls http://aiju.de/plan_9/plan9-syscalls This is how you make a sim
by MisterTea 7y ago
For inspiration, have a look at the plan 9 syscall table:
http://aiju.de/plan_9/plan9-syscalls http://aiju.de/plan_9/plan9-syscalls
This is how you make a simple yet flexible OS. Use an rpc protocol to do all the talking to objects within the system which are exposed as files. It's very REST like and allows any programming language to interact with those objects by reading/writing them as files. So you have a very uniform interface that eliminates a lot of binaries as now simple scripts can handle the work of reading and writing those files. Then realize that you can easily export those files to other machines on a lan or the internet. So the tcp stack of an internet facing machine can be exported and mounted on multiple machines who now all talk to the internet via that one machines tcp stack. And that can even be done across the net to bypass "great firewalls". Bye bye nat.
- pjmlp 7y agoLike WebDAV. As far as I can remember Inferno did syscalls in a different way, given that Limbo with DisVM was the main programming language.
- monocasa 7y agoThey added a couple pieces to help the VMs, but the syscall layer is pretty Plan 9 inspired on Inferno. A few of the man pages call out 9p explicitly. All of the Sys_* here are the system calls on Inferno https://bitbucket.org/inferno-os/inferno-os/src/master/os/port/inferno.c https://bitbucket.org/inferno-os/inferno-os/src/master/os/po...
- pjmlp 7y agoThanks for the hint.
- zozbot234 7y ago> Use an rpc protocol to do all the talking to objects within the system which are exposed as files. At some point, you're just adding pointless layers of indirection by doing this. NT tried this approach, and it is anything but "simple". You can do many things quite naturally by interacting with bytestream-like or block-like objects that are exposed via some sort of hierarchical namespace ("files"), but this doesn't really cover everything. Some things may be better done, even in a script, by interacting with a "binary" that in turn just wraps a binary library exposing some kind of ABI.
- kjs3 7y agoI don't disagree, per se, but designing for the exception is also a good way to end up with a mess. You have to carefully measure the impact (performance, maintenance, developer impact, etc.) of every special case.
- magicalhippo 7y agoI'm a n00b when it comes to these sort of things, how would one upload a texture to a GPU, for example, using this? Open the "GPU driver file", seek to some specific location and write the texture bytes?
- 0xakhil 7y agoOne way is to open the driver file and use an ioctl call to allocate a shared buffer and write your texture there.
- magicalhippo 7y agoBut have you gained anything then? The application doing the ioctl still has to be acutely aware of how exactly to perform the ioctl, no? That is, I couldn't just `cat` a texture into my GPU.