Im not exactly sure about Java mem stack limit and how it uses OS threads.
I will post this in context of GoLang (GO) just for the sake I wanted to write and I love Go, I hate Java (dont ask me why).
goroutines are not OS threads, but they are not exactly Green Threads as well.
Go’s mechanism for hosting goroutines is an implementation of what’s called an M:N scheduler , which means it maps M green threads to N OS threads.
Goroutines are then scheduled onto the green threads. When we have more goroutines than green threads available, the scheduler handles the distribution of the goroutines across the available threads.