-
Notifications
You must be signed in to change notification settings - Fork 162
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
base: master
Are you sure you want to change the base?
Conversation
fix typo
Add deadlock state
|
||
### 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`. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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?
Descriptions have been added about the number of vm, the number of instantied vm and the number of pipes. |
PR for ckb: nervosnetwork/ckb#4380