Andy-Python-Programmer / aero

Aero is a new modern, experimental, UNIX-like operating system following the monolithic kernel design. Supporting modern PC features such as long mode, 5-level paging, and SMP (multicore), to name a few.

Home Page:https://aero.andypy.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fast IPC

Andy-Python-Programmer opened this issue · comments

Inter Process Communication should be fast and effective. The performance of IPC is vital for modern operating systems. Here is an overview of how we can accomplish this in Aero:

  1. Each task will have its own message queue that contains pending messages.
  2. The message will contain the sender's PID and TID with data (&[u8]). It will aswell contain a message ID (usize) used to identify the message without needing to parse the message itself.
  3. Using the sys_ipc_send and sys_ipc_get system calls the tasks can communicate with each other efficiently.

Drawbacks

This would require the kernel to clone the message 2 times (when you send the message the kernel keeps a copy of the message and for the task that we are sending to has to clone it again)

idea stolen, thank you good sir. But i will implement it in C so much better

C is not nice

:( that's hurtful

you only need to clone once in my design - sys_sendmsg can block until a sys_recvmsg and copy directly from one to another.

also you totally ripped off my design (except mine was superior as it was in D)

idea stolen, thank you good sir. But i will implement it in C so much better

sorry, i came up with this idea and implemented it in D - which is even better than C.

too bad, undoubtedlyslowipc™ is based on the quantum technology of spaceos.

C is not nice

rust code looks bad.

Let C code in! There is no objective reason not to use (good) C code!

Lets keep this issue on topic. Also its rust is not ugly, I think you need glasses.

We now have a working implementation of this concept in #47 :^)

We have recently merged an implementation of this by @pitust in #54 which superseded my #47, which solved this issue 🥳