I was reading about green threads and was able to understand that these threads are created by the VM or during runtime and not by the os but I am not able to understand the following statement
When a green thread executes a blocking system call, not only is that thread blocked, but all of the threads within the process are blocked.
Can anyone please explain how is it possible ?
That's pretty simple actually.
"Green Threads" are implemented programmatically inside the VM, which schedules the CPU and memory among them, just like a real OS schedules those resources among OS-level processes and threads.
But from the OS point of view, there is just one thread - the VM itself, so when it makes a blocking system call (on behalf of one of the "Green Threads" it manages internally), this single thread is naturally blocked, and can not do anything, including scheduling the "Green Threads", so the "world stops" for them too.