Feb 16th, 2007, 19:23 | 只看该作者 #109 | |
资深网络评论员
注册日期: Jul 2004
帖子: 1,223
积分:2
精华:2
声望: 1025106
|
引用:
如果你是靠这个吃饭的,建议你赶快改行,《计算机体系结构》就没学好嘛。不是靠这个吃饭的话,就要好好去学点基本常识。 WIKI介绍的基本常识: http://en.wikipedia.org/wiki/Multi-core 你的图那页也有。所以我推测你我说的应该是同一样东西。那么请看里面Disadvantages的第一段。最好是全部都看看吧。 |
|
|
Feb 17th, 2007, 15:55 | 只看该作者 #114 |
资深网络评论员
注册日期: Jul 2004
帖子: 1,223
积分:2
精华:2
声望: 1025106
|
连这些基本知识都还没掌握,还能做CPU设计?!你还不知道“多核cpu是不需要任何软件支持的, 多处理器系统需要分布式软件操作系统支持”这种说法是多么的菜?!你还是先科普一下吧。不要急着说什么“信口开河”啦、“搞清楚这两个的区别, 再来发话”啦。 转贴一个给你科普一下: Software benefits from multicore architectures where code can be executed in parallel. Under most common operating systems this requires code to execute in separate threads. Each application running on a system runs in its own thread so multiple applications will benefit from multicore architectures. Each application may also have multiple threads but, in most cases, it must be specifically written to utilize multiple threads. Operating system software also tends to run many threads as a part of its normal operation. Running virtual machines will benefit from adoption of multiple core architectures since each virtual machine runs independently of others and can be executed in parallel. Most application software is not written to use multiple concurrent threads intensively because of the challenge of doing so. A frequent pattern in multithreaded application design is where a single thread does the intensive work while other threads do much less. For example a virus scan application may create a new thread for the scan process, while the gui thread waits for commands from the user (e.g. cancel the scan). In such cases, multicore architecture is of little benefit for the application itself due to the single thread doing all heavy lifting and the inability to balance the work evenly across multiple cores. Programming truly multithreaded code often requires complex co-ordination of threads and can easily introduce subtle and difficult to find bugs due to the interleaving of processing on data shared between threads (thread-safety). Debugging such code when it breaks is also much more difficult than single-threaded code. Also there has been a perceived lack of motivation for writing consumer-level threaded applications because of the relative rarity of consumer-level multiprocessor hardware. Although threaded applications incur little additional performance penalty on single-processor machines, the extra overhead of development was difficult to justify due to preponderance of single-processor machines. As of Fall 2006, with the typical mix of mass-market applications the main benefit to an ordinary user from a multi-core CPU will be improved multitasking performance, which may apply more often than expected. Ordinary users are already running many threads; operating systems utilize multiple threads, as well as antivirus programs and other 'background processes' including audio and video controls. The largest boost in performance will likely be noticed in improved response time while running CPU-intensive processes, like antivirus scans, defragmenting, ripping/burning media (requiring file conversion), or searching for folders. Example: if the automatic virus scan initiates while a movie is being watched, the movie is far less likely to lag, as the antivirus program will be assigned to a different processor than the processor running the movie playback. Given the increasing emphasis on multicore chip design, stemming from the grave thermal and power consumption problems posed by any further significant increase in processor clock speeds, the extent to which software can be multithreaded to take advantage of these new chips is likely to be the single greatest constraint on computer performance in the future. If developers are unable to design software to fully exploit the resources provided by multiple cores, then they will ultimately reach an insurmountable performance ceiling. Current software titles designed to utilize multi-core technologies include: NewTek Lightwave, World of Warcraft, City of Heroes, City of Villains, Maya, Blender3D, Quake 3 & Quake 4, Elder Scrolls: Oblivion, Falcon 4: Allied Force, 3DS Max, Adobe Photoshop, Paint.NET, Windows XP Professional, Windows 2003, Windows Vista, Mac OS X, Linux, Tangosol Coherence, GigaSpaces EAG, DataRush from Pervasive Software, numerous Ulead products including MediaStudio Pro 7 & 8 (pro video editor), VideoStudio 10 and 10 Plus (consumer video editor), DVD MovieFactory 5 & 5 Plus (DVD authoring) and PhotoImpact 12 (graphics tool), and many operating systems that are streamlined for server use. Most video games designed to run on Sony's Playstation 3 are expected to take advantage of its multi-core Cell microprocessor. The first-person shooter Resistance: Fall of Man reportedly dedicates one of the Cell's SPE cores to processing enemy AI.[citation needed] Parallel programming techniques can benefit from multiple cores directly. Some existing parallel programming models such as OpenMP and MPI can be used on multi-core platforms. Other research efforts have been seen also, like Cray’s Chapel, Sun’s Fortress, and IBM’s X10. Concurrency acquires a central role in true parallel application. The basic steps in designing parallel applications are: Partitioning The partitioning stage of a design is intended to expose opportunities for parallel execution. Hence, the focus is on defining a large number of small tasks in order to yield what is termed a fine-grained decomposition of a problem. Communication The tasks generated by a partition are intended to execute concurrently but cannot, in general, execute independently. The computation to be performed in one task will typically require data associated with another task. Data must then be transferred between tasks so as to allow computation to proceed. This information flow is specified in the communication phase of a design. Agglomeration In the third stage, we move from the abstract toward the concrete. We revisit decisions made in the partitioning and communication phases with a view to obtaining an algorithm that will execute efficiently on some class of parallel computer. In particular, we consider whether it is useful to combine, or agglomerate, tasks identified by the partitioning phase, so as to provide a smaller number of tasks, each of greater size. We also determine whether it is worthwhile to replicate data and/or computation. Mapping In the fourth and final stage of the parallel algorithm design process, we specify where each task is to execute. This mapping problem does not arise on uniprocessors or on shared-memory computers that provide automatic task scheduling. On the other hand, on the server side, multicore processors are ideal because they allow many users to connect to a site simultaneously and have independent threads of execution. This allows for Web servers and application servers that have much better throughput. 祝在新的一年里学业进步! |
|
Feb 17th, 2007, 20:40 | 只看该作者 #117 |
Senior Member
注册日期: Sep 2006
帖子: 860
声望: 288734
|
这坑挖的。。。 其实multicore的目的是因为目前半导体技术的极限已经差不多哦达到,散热和die size都是最大的问题。分成core后可以好很多。但是目前应用软件是multi-thread的不多,当然这样被multicore一带动,以后以multi-thread为核心的引用程序会多起来。 楼上的那个谁说context switch消耗不大的也不对。。。。context switch可是OS里最麻烦的一步了。个人认为scheduler是否对于应用的效率高,是os设计上很关键的一步,因为context switch的消耗实在太大了,就光那个cpu trap 中断就是够呛。。。当年在多大写OS的时候,把cpu trap中断调低后明显程序速度快很多(我写的priority queue 进程调度器)。当然前提是你的确有多个thread运行且cpu load不低。 还有上面的有点错误,thread之间除了stack独立以外,code和data segment全是共享的。所以scheduler在选择的时候,thread的消耗是最轻的,因为要备份的东西少很多。 还有这些结构具体实现都是公司的机密,哪能被你们轻易知道,houhou, 就是amd的工作人员,知道的也就几个core disgner而已。。。 p.s. 个人看好multi-core,如果软件上开始往multithread开始写的话。 |
|