title: need some clarifications about dispatch queue, thread and NSRunLoop
body: <p><strong>The following things are what I know &amp; understand:</strong></p>
  <p>Global queue is a <strong>concurrent</strong> queue which can dispatch  tasks to multiple threads. The order of executing task is not guaranteed. e.g.:</p>
  <pre><code>dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0), {
   for (int i; i&lt;10; i++) {
    doTask()
   }
  })
  </code></pre>
  <p>If I want to dispatch to <strong>serial</strong> queue, I can use</p>
  <pre><code>dispatch_async(dispatch_queue_create(&quot;my.serial.queue&quot;, nil) {
    ...
  }
  </code></pre>
  <p>each time only one task is dispatched to a thread &amp; get executed. The order is FIFO.</p>
  <p><strong>===== What I am confused &amp; not fully understand =======</strong></p>
  <ol>
  <li><p>The main thread has a NSRunLoop, looping tasks in main thread. I am wondering what is the relation ship between dispatch queue and run loop?
  Can I understand it like, if dispatching a task to main thread, the main thread's NSRunLoop get the dispatched task and execute it?</p>
  </li>
  <li><p>What about global queue which dispatching tasks to multiple threads? Does iOS/OSX system automatically create not only the threads, but also create NSRunLoop for each thread? and then the run loop in each thread get the dispatched task from global queue &amp; execute it?</p>
  </li>
  <li><p>Who knows the thread? Do <code>dispatch_async()</code> and <code>dispatch_sync()</code> function know to which thread to dispatch task or does the <strong>queue</strong> knows to which thread to dispatch task?</p>
  </li>
  <li><p>Is there a way to get NSRunLoop object of the thread(to which the task is dispatched) from dispatch queue programmatically? (this question is related with question 3)</p>
  </li>
  </ol>