title: Are Java threads created in user space or kernel space?
body: <p>Check this code out</p>
  
  <pre><code>    Thread t1 = new Thread(new Runnable() {
  
          @Override
          public void run() 
          {
              try
              {
                  System.out.println("STARTING SERVER...");
                  ServerSocket s = new ServerSocket(2544);
                  System.out.println("SERVER BLOCKED ON ACCEPT");
                  Socket ss = s.accept();
                  System.out.println("SERVER NOT BLOCKED ANYMORE");
              }
              catch(Exception ex)
              {
                  ex.printStackTrace();
              }
          }
      });
      t1.start();
  
  
  
      Thread t2 = new Thread(new Runnable() {
  
          @Override
          public void run() 
          {
              try
              {
                  while(true)
                  {
                      Thread.sleep(1000);
                      System.out.println("Hello");
                  }
              }
              catch(Exception ex)
              {
                  ex.printStackTrace();
              }
          }
      });
      t2.start();
  </code></pre>
  
  <p><strong>Outputs:</strong></p>
  
  <pre><code>STARTING SERVER...
  SERVER BLOCKED ON ACCEPT
  Hello
  Hello
  Hello
  Hello
  Hello
  Hello
  Hello
  ...
  </code></pre>
  
  <p>Java threads should be user space threads, right? So one blocked thread should block the entire process...thats not what happened. What is happening them?</p>