Skip to content

Commit

Permalink
Add constraints descriptions for process and pipe.
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed May 6, 2024
1 parent 620e744 commit 4dd13b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,15 @@ The arguments used here are:
The arguments used here - index, source, bounds, place, argc, and argv - follow the usage described in [EXEC].
There are some hard limits to the system to avoid the overuse of resources.
- CKB-VM allows 16 processes to exist at the same time (excluding the root process). Processes that are created but exit normally will not be counted.
- A maximum of 4 instantiated VMs is allowed. Each process needs to occupy a VM instance to run. When the number of processes is greater than 4, some processes will enter a state called "uninstantiated". CKB-VM implements a scheduler to decide which processes should be "instantiated" and which processes should be "uninstantiated". However, switching the instantiation state of a VM is very expensive, developers should try to keep the number of processes below 4 so that all processes are instantiated.
### Pipe
[Pipe]: #pipe
This syscall create a pipe with read-write pair of file descriptions. The file descriptor with read permission is located at `fds[0]`, and the corresponding file descriptor with write permission is located at `fds[1]`.
This syscall create a pipe with read-write pair of file descriptions. The file descriptor with read permission is located at `fds[0]`, and the corresponding file descriptor with write permission is located at `fds[1]`. A maximum of 64 file descriptors can exist at the same time.
```c
int ckb_pipe(uint64_t fds[2]);
Expand Down

0 comments on commit 4dd13b9

Please sign in to comment.