-
Notifications
You must be signed in to change notification settings - Fork 1
Judger Design
This project is not very complex, most code self-explain and do not need that much comment, so I would keep it short.
Follow judger.proto
, mainly to provide ability to compile and execute untrusted code remotely.
Before understanding judger design, you need to understand a little more about sandbox.
You don't need to understand it fully, because we use a patched nsjail
under hood.
Organization is useful to quickly allocate the problem, with organization and trace, you can at least figure out where the program stuck.
To show how its organization, look at following diagram
Let's look at a case where you want to add support for cgroup v1.
The reason we cannot just use cgroup v1 with the help of cgroup-rs
is because we need to write 1 into cgroup.kill
file.
So we need alternative method to kill it, that method is killpg()
, therefore we need to rearrange the chart to
container
--(depend)-->RunningProc
--(associate)-->Limiter...
Therefore you know what part you can get started with!