How sysctl applies the changes to kernel's runtime parameters the moment you run sysctl command?
Answer
If you strace the sysctl command you can see it does it by changing the file under /proc/sys/...
In the past it was done with sysctl system call, but it was deprecated at some point.