ConcurrencydistributionclientserverandtheInternet

上传人:re****.1 文档编号:497870244 上传时间:2024-01-02 格式:DOC 页数:126 大小:224KB
返回 下载 相关 举报
ConcurrencydistributionclientserverandtheInternet_第1页
第1页 / 共126页
ConcurrencydistributionclientserverandtheInternet_第2页
第2页 / 共126页
ConcurrencydistributionclientserverandtheInternet_第3页
第3页 / 共126页
ConcurrencydistributionclientserverandtheInternet_第4页
第4页 / 共126页
ConcurrencydistributionclientserverandtheInternet_第5页
第5页 / 共126页
点击查看更多>>
资源描述

《ConcurrencydistributionclientserverandtheInternet》由会员分享,可在线阅读,更多相关《ConcurrencydistributionclientserverandtheInternet(126页珍藏版)》请在金锄头文库上搜索。

1、30 Concurrency, distribution,client-server and the Internet30 Concurreclient-serLike humanthem could oappearance oimplicitly asscontrol. We smove to concConcurrconfined to fdatabase manprestigious, community.Things habout every tyfundamentally sequential in nature. Beyond mere concurrency, our syste

2、ms, whether or not SNEAK PREVIEW this discussion will not throw a pre-cooked answer at you, but instead willbuild a solution from a detailed analysis of the problem and an exploration ofWarning: SPOILER! (The nesection is 30.72, pag30.1 AAs usual,carefully client-server, must increasingly become dis

3、tributed over networks, including the networkof networks the Internet. This evolution gives particular urgency to the central questionof this chapter: can we apply object-oriented ideas in a concurrent and distributed context?Not only is this possible: object technology can help us develop concurren

4、t anddistributed applications simply and elegantly.possible aventhe techniquethat would besettle is in fabegin by examIf you haxt drama pre page sumncy, distribution, ver and the Internets, computers can team up with their peers to achieve results that none ofbtain alone; unlike humans, they can do

5、many things at once (or with thef simultaneity), and do all of them well. So far, however, the discussion hasumed that the computation is sequential proceeds along a single thread ofhould now see what happens when this assumption no longer holds, as weurrent (also known as parallel) computation.ency

6、 is not a new subject, but for a long time interest in it remained mostlyour application areas: operating systems, networking, implementation ofagement systems, and high-speed scientific software. Although strategic andthese tasks involve only a small subset of the software developmentave changed. C

7、oncurrency is quickly becoming a required component of justpe of application, including some which had traditionally been thought of asues, including a few dead ends. Although necessary to make you understands in depth, this thoroughness might lead you to believe that they are complex; inexcusable,

8、since the concurrency mechanism on which we will finallyct characterized by almost incredible simplicity. To avoid this risk, we willining a summary of the mechanism, without any of the rationale.te spoilers , preferring to start with the full statement of the issues and to let theoceed to its d?nou

9、ement step by step and inference by inference, ignore the one-mary that follows and skip directly to the next section.952.1The extas it can get sis this possiblexecuted on bargument a. Bmay now relymove ahead wBecausesame processintent is for awe declare x:so that calls oa declaration,new thread ofN

10、owherwe state, throprocessors, sassignment cprocessors: a as well by a taof such a taskthe same concomputer, distask) withoConfigurationphysical resoWe need No speca separaneeds tovalue:= To obtaentity a A routinwait unt To guarrest assucharge o We mayprioritytake theThis covconcurrent anmultiple in

11、hefor a while alCONCURRENCY, DISTRIBUTION, CLIENT-SERVER AND THE INTERNET30ension covering full-fledged concurrency and distribution will be as minimaltarting from a sequential notation: a single new keyword separate. Howe? We use the fundamental scheme of O-O computation: feature call, xlf(a),ehalf

12、 of some object O1 and calling f on the object O2 attached to x, with theut instead of a single processor that handles operations on all objects, we on different processors for O1 and O2 so that the computation on O1 canithout waiting for the call to terminate, since another processor handles it. th

13、e effect of a call now depends on whether the objects are handled by theor or different ones, the software text must tell us unambiguously what theny x. Hence the need for the new keyword: rather than just x: SOME_TYPE, separate SOME_TYPE to indicate that x is handled by a different processor,f targ

14、et x can proceed in parallel with the rest of the computation. With such any creation instruction! xlmake () will spawn off a new processor a control to handle future calls on x.e in the software text should we have to specify which processor to use. Allugh the separate declaration, is that two obje

15、cts are handled by differentince this radically affects the system s semantics. Actual processoran wait until run time. Nor do we settle too early on the exact nature ofprocessor can be implemented by a piece of hardware (a computer), but justsk (process) of the operating system, or, on a multithrea

16、ded OS, just a thread. Viewed by the software, processor is an abstract concept; you can executecurrent application on widely different architectures (time-sharing on onetributed network with many computers, threads within one Unix or Windowsut any change to its source text. All you will change is a Concurrency File which specifies the last-minute mapping of abstract processors tources. to specify synchronization constraints. The conventions are straightforw

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 资格认证/考试 > 自考

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号