Threading

Java 多线程编程

多线程在软件开发中用得很多,现在几乎所有的软件都用到了多线程,如:QQ、迅雷、eclipe集成开发环境等。

 

什么是多线程?

 

当一个程序启动后就是一个进程,可以理解进程就是CPU的一个执行流程,而多线程就是在一个进程内执行多个线程,相当于在一个执行流程内开辟多个执行序列,举个例子:一个服务员每天要做端菜、洗碗、拖地等事情,每件事情可以理解为一个执行流程,让他开始洗碗那么他必须要把碗洗完了才能做其他的事情(流程),这样效率就很低,如果在他正在洗碗的时候能够做其它事情那么就很高效了,如他正在洗碗,这时让他去端菜,那就暂时停止洗碗去端菜,菜端完了继续洗碗。

时间片:

简单理解就是分配给线程的执行时间,实际上线程在微观上是串行执行的,也就是一个个执行,但是系统给每个线程都分配的执行时间,

如:

线程1 分配10ms的执行时间

线程2 分配10ms的执行时间

由于时间很短给人的感觉就是多个线程在一起执行。

 线程的生命周期:

一个线程从创建、启动、结束有几种状态。

Troubleshooting HOWTO: Bad hardware? MPSS? Configuration?

Are you having problems with your hardware (Cannot see your Intel(R) Xeon Phi(tm) coprocessor?  Sporadic accessibility?) or with the Intel(R) Manycore Platform Software Stack (Intel(R) MPSS) running reliably?

Attached to this post are PDF "flowcharts" that explain how you can troubleshoot the problem (note:  Both Linux and Windows flowcharts are available), and shows what information you will want to collect if you need to escalate your issue to your OEM provider or Intel.

What collateral/documentation do you want to see?

Do you have questions that you are not finding the answers for in our documentation?  Need more training, source code examples, on what specifically?   Help us understand what's missing so that we can make sure we develop documentation you care about (what is important, and what is nice to have)!   Thank you

FAQS: Compilers, Libraries, Performance, Profiling and Optimization.

In the period prior to the launch of Intel® Xeon Phi™ coprocessor, Intel collected questions from developers who had been involved in pilot testing. This document contains some of the most common questions asked. Additional information and Best-Known-Methods for the Intel Xeon Phi coprocessor can be found here.

The Intel® Compiler reference guides can be found at:

Slides from May 4th Webinar on Cilk

Hi all,

We did a webinar this morning at 8am Pacific time on changes and new updates in Cilk in the Intel Parallel Composer beta. I am posting the slides here. Let me know if there's any interest to do another webinar on this around 5pm or so Pacific time - I want to see if there's anyone that couldn't attend due to the time that would have liked to attend. Thanks everyone, and I really enjoyed the questions in today's session.

OpenMp with Offload

Hi,

I'm using Ubuntu 14.04.

1. Is there a way to use openMp and offload the parallel code into the GPU ? (intel HD graphics) ?

if yes:

2. which icc version do I need ? (can I do it with gcc ?)

3. which Intel processors are supported ?

 

Thanks

 

Iscriversi a Threading