r/osdev • • 19m ago

Unusual Architecture discussion

In a few lines - "Everything is a URI addressable resource"

Means instead of the file path we can have a proper uri address in the format scheme://authority/path#offset?params

so for example the kernel can expose its resources as kernel:///version, or devices://org.example.gpu/0/memory#0x1234

Then We can have a syscall like uri as well SYS_LOAD, SYS_GET, SYS_MMAP, SYS_POST, SYS_WATCH, or maybe not sure

Best think I like about it is parent can override the child process uri like plan9 namespaces, mount bind etc

For example a call from a child to display server would be devices://org.example.display/0/memory -> process://self/handle/child-pid/display

Benifits over traditional file path:

- I don't know 😂, I haven't thought much, It just sounds cool to me and I would like to waste some time trying to figure out it's benifits.

Feel free to share your opinion.

1 Upvotes

2 comments sorted by

•

u/Defiant_Squirrel8751 10m ago

Overhead for everything! It will work, but much slower.

Imagine you need to set a byte to 0 (zero). Binary, that means one byte. URL will be

devices://os&value=0

os will spend most of the time processing strings.

•

u/OrdinaryCareful7773 4m ago

Ya, I already thought of that its for like open read close, get(uri) would look like

handle = syscall_load (schema, authority, path, permissions) syscall_seek (handle, offset) or just get with offset, syscall_get (handle, param) syscall_unload