Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update spawn syscalls #436

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

mohanson
Copy link
Contributor

@mohanson mohanson commented Apr 19, 2024

xxuejie
xxuejie previously approved these changes Apr 25, 2024
rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md Outdated Show resolved Hide resolved
rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md Show resolved Hide resolved
rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md Outdated Show resolved Hide resolved
rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md Outdated Show resolved Hide resolved
rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md Outdated Show resolved Hide resolved

### Spawn example
- If the Writer writes W bytes and the Reader reads R bytes where W > R, the Writer will block, and the Reader will return immediately with R bytes in `*length`. The Reader can then call `ckb_read` again to read the remaining W - R bytes.
- If the Writer writes W bytes and the Reader reads R bytes where W <= R, both the Writer and the Reader will return immediately with W bytes in `*length`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do recommend that we include more cases here, for example: if a VM tries to read from a channel, but no other VM writes to that channel, will the VM reading data hang there? Or will there be early return in some cases? We should really cover all those cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added two scenarios about hang. Scenarios about writing or reading from a closed fd are introduced in ckb_close.

Copy link
Contributor

@xxuejie xxuejie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some hard limits to the system, such as:

  • How many VMs can be instantiated at the same time?
  • The maximum number of VMs(including suspended ones) a scheduler can spawn?

Are those documented anywhere?

rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md Show resolved Hide resolved
@mohanson
Copy link
Contributor Author

mohanson commented May 6, 2024

There are some hard limits to the system, such as:

  • How many VMs can be instantiated at the same time?
  • The maximum number of VMs(including suspended ones) a scheduler can spawn?

Are those documented anywhere?

Descriptions have been added about the number of vm, the number of instantied vm and the number of pipes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants