- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Design-Driven Compilation - MIT CSAIL.ppt
Analysis of Multithreaded Programs Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology What is a multithreaded program? Why do programmers use threads? Performance (parallel computing programs) Single computation Execute subcomputations in parallel Example: parallel sort Program structuring mechanism (activity management programs) Multiple activities Thread for each activity Example: web server Properties have big impact on analyses Practical Implications Threads are useful and increasingly common POSIX threads standard for C, C++ Java has built-in thread support Widely used in industry Threads introduce complications Programs viewed as more difficult to develop Analyses must handle new model of execution Lots of interesting and important problems! Outline Examples of multithreaded programs Parallel computing program Activity management program Analyses for multithreaded programs Handling data races Future directions Parallel Sort Key Properties of Parallel Computing Programs Structured form of multithreading Parallelism confined to small region Single thread coming in Multiple threads exist during computation Single thread going out Deterministic computation Tasks update disjoint parts of data structure in parallel without synchronization May also have parallel reductions Web Server Main Loop Class Main { static public void loop(ServerSocket s) { c = new Counter(); while (true) { Socket p = s.accept(); Worker t = new Worker(p,c); t.start(); } } Worker threads class Worker extends Thread { Socket s; Counter c; public void run() { out = s.getOutputStream(); in = s.getInputStream(); while (true) { inputLine = in.readLine(); c.increment(); if (inputLine == null) break; out.writeBytes(inputLine + \n); } } } Synchronized Shared Counter Class Counter { int contents = 0; synchronized void increment() { contents++; } } Simple Activity Management Pro
您可能关注的文档
- Broadcasting in Ad hoc networks based on Self pruning.ppt
- Budgeting with Women in Mind.doc
- Building on Success Reforming the U - Great Transformations.doc
- Built-in Self-Calibration of On-chip DAC and ADC.ppt
- Bulk Viscous Effects on Relativistic Hydrodynamic Models of.ppt
- Burden of Health Care Costs Businesses, Households and.ppt
- Bus Rapid Transit in Latin America - nexus.umn.edu.ppt
- BUSINESS DRIVEN TECHNOLOGY, 2e - McGraw-Hill Ryerson.ppt
- BUSINESS DRIVEN TECHNOLOGY, 2e - StFX.ppt
- Byzantine fault tolerance - Systems@NYU.ppt
- DESIGNING A SPEAKER-DISCRIMINATIVE ADAPTIVE FILTER strongBANKstrong FOR.ppt
- Designing metadata for resource discovery - nla.gov.au.ppt
- Detecting Phantom Nodes in Wireless Sensor Networks.ppt
- Detection of a direct carbon dioxide effect in continental.ppt
- Determinants of Malaysian Trade Balance An Ardl Bound Testing.doc
- Determination of Piezoelectric and Pyroelectric Coefficients.ppt
- DETERMINATION OF SILANOL NUMBER ON SILICA-GEL PARTICLES BY.ppt
- Developing a Learning Organisation - IATUL.ppt
- Development and Perspectives of the Social Economy or Third.doc
- Differencing and Merging of Architectural Views.ppt
最近下载
- 预见性护理及早期风险识别PPT课件.pptx VIP
- 1.7 有理数的加减混合运算(分层练习).pdf VIP
- 打造“四有”体育课堂-发展学生核心素养.docx VIP
- 洋马发动机喷射泵拆卸更换调整.pptx VIP
- 2025年人工智能训练师(五级)初级资格理论考试练习题库(476题)含答案.pdf VIP
- 苏教版五年级小数的加法和减法练习题1(完美打印版).doc VIP
- 2023年上海市第二十四届初中物理竞赛(大同中学杯)初赛试卷及答案.docx
- 第5课 美丽河山我们的家 课件 人民版中华民族大家庭.pptx
- 英语人教版九年级全册Unit2 Section A教学设计.doc VIP
- 2025海康威视网络硬盘录像机(76+77+86+E系列)用户手册.docx VIP
文档评论(0)