文件名称:
intro to python concurrency by beazley.pdf
开发工具:
文件大小: 432kb
下载次数: 0
上传时间: 2019-07-13
详细说明:David beazley 在pycon 上的presentation, David Beazley 在python领域具有全球号召力和影响力,他对concurrency asyncio 有深入理解和独到的看法,尽管这些看法与core developers 或者说Guido 有些不同。Support Files
o Code samples and support files for this class
http://www.dabeaz.com/usenix2009/concurrent/
e Please go there and follow along
Copyright(c)2009,daVidBeazleyhttp://www.dabeaz.com
An Overview
o Were going to explore the state of concurrent
programming idioms being used in Python
A look at tradeoffs and limitations
e Hopefully provide some clarity
o A tour of various parts of the standard library
y
e Goal is to go beyond the user manual and tie
everything together into a"bigger picture
Copyright(c)2009,daVidBeazleyhttp://www.dabeaz.com
4
Disclaimers
o The primary focus is on Python
This is not a tutorial on how to write
concurrent programs or parallel algorithms
No mathematical proofs involving dining
philosophers"or anything like that
o I will assume that you have had some prior
exposure to topics such as threads, message
passing, network programming, etc
Copyright(c)2009,daVidBeazleyhttp://www.dabeaz.com
Disclaimers
I like Python programming, but this tutorial is
not meant to be an advocacy talk
o In fact, we're going to be covering some
pretty ugly(e. g,"sucky")aspects of Python
e You might not even want to use Python by
the end of this presentation
o That's fine. education is my main agenda
Copyright(c)2009,daVidBeazleyhttp://www.dabeaz.com
Part
Some basic Concepts
Copyright(c)2009,daVidBeazleyhttp://www.dabeaz.com
7
Concurrent Programming
o Creation of programs that can work on
more than one thing at a time
o Example: A network server that
communicates with several hundred clients
all connected at once
o Example A big number crunching job that
spreads its work across multiple cpus
Copyright(c)2009,daVidBeazleyhttp://www.dabeaz.com
8
multitasking
o Concurrency typically implies"multitasking
TaskA
run
run
run
task switch
Task b
run
run
If only one CPU is available, the only way it
can run multiple tasks is by rapidly switching
between them
Copyright(c)2009,daVidBeazleyhttp://www.dabeaz.com
9
Parallel Processing
o You may have parallelism(many CPUs)
Here, you often get simultaneous task execution
aska:
→m-cPU
run
run
run
Task b
CP∪U2
run
run
run
Note: If the total number of tasks exceeds the
number of cpus. then each cpu also multitasks
Copyright(c)2009,daVidBeazleyhttp://www.dabeaz.com
0
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.