[1] restricting global shared memory, enforcing fault isolation through the process model, and supervisors
You are correct, Erlang uses something akin to "green processes" where it manages its own threads but they do not share anything in the way that normal threads would.
Unless that connection managed to write over some memory already. Then you can't just close the connection. You have to restart the whole server OS process.
> I doubt that erlang spawns millions of OS processes because that would be extremely inefficient due to CPU context switching
Erlang does spawn millions of processes. You can try it yourself in a few lines of code. They are not OS processes though. Although they are similar in that OS processes and Erlang ones don't share memory with their peers -- a very useful property indeed.
So Erlang in a way can have it cake and eat it took. It gets the benefit of OS processes but at a much lower cost.
He's referencing processes on the Erlang virtual machine, not OS processes. A BEAM process is much lighter weight.
With Erlang (or rather, the Actor model), you can build state-full pieces of code that are also resilient to crashes that cascade across the entire system, by having a standard pattern of restarting individual actors from a known clean state through a clean supervisor hierarchy.
I doubt that erlang spawns millions of OS processes because that would be extremely inefficient due to CPU context switching. So in reality, all erlang is doing behind the scenes is closing the connection and destroying the session... It's not actually crashing and restarting any processes... You can easily implement this behavior with pretty much any modern server engine such as Node.js and tornado.