Implement of Java Socket and OS thread schedule