欢迎来到留学生英语论文网

客服信息

我们支持 澳洲论文代写 Assignment代写、加拿大论文代写 Assignment代写、新西兰论文代写 Assignment代写、美国论文代写 Assignment代写、英国论文代写 Assignment代写、及其他国家的英语文书润色修改代写方案.论文写作指导服务

唯一联系方式Q微:7878393

当前位置:首页 > 论文范文 > It Research

Thread of execution

发布时间:2017-03-20
该论文是我们的学员投稿,并非我们专家级的写作水平!如果你有论文作业写作指导需求请联系我们的客服人员 MULTITHREADING

A thread is a short for a thread of execution. Threads are a way for a program to split itself into two or more simultaneously running tasks.

Multiple threads can be executed in parallel across many computer systems and usually occurs by time slicing across the computer systems. However, in a single processor environment, the processor 'context switches' between different threads. In this case, the processing is not literally real-time, for the single processor is really doing only one thing at a time. This switching can happen so fast as to give the illusion of simultaneity to an end user.

For example, many PCs may only contain one processor core, but that runs multiple programs at once, such as watching movie while surfing internet. Although the user experiences these things as simultaneous, in truth, the processor quickly switches back and forth between these separate processes. On a multiprocessor or multi-core system, threading can be achieved via multiprocessing, where multi-threading happens to process and run literal simultaneously on different processors or cores.

What exaclty is the difference between multiple processes and multiple threads? The essential difference is that while each process has a complete set of its own variables, threads share the same data. However, shared variables make communication between threads more efficient and easier to program than inter-process communication. Moreover, on some operating systems, threads are more "lightweight" than processes-it takes less overhead to create and destroy individual threads than it does to launch new processes. Multithreading is extremely useful in practice. For example, a browser should be able to simultaneously download multiple images. A web server needs to be able to serve parallel requests.

The Design of the Architecture

Reasons of Development

Traditionally, a code written is sequential which means, the code is executed one instruction after the next in a gigantic fashion, with no regard to the many possible resources available to the program. Overall performance can be serve rely degraded if the program performs a blocking call. The codes are normally in sequential because most of us think in a sequential manner. Parallelizing our is unnaturally nor is it an easy task.

However, with the increasing availability of Symmetric-Multiprocessing machines, and even more advanced multi-core processors and programming multithreaded code is a skill worth learning which make the overall performance to be completed smoothly and fast.

How it works

Basically there are 4 different types of multithreading which is Interleaved multithreading, Blocked Multithreading, Simultaneous multithreading (SMT) and Chip multiprocessing.

Interleaved Multithreading is known as fine-grained multithreading. The processor deals with two or more thread contexts at a time, switching from one thread to another at each clock cycle. If a thread is blocked because of data dependencies or memory latencies, that thread is skipped and a ready thread is executed.

Coarse-grained multithreading is another name for blocked multithreading that instructing a thread are executed successively until an event occurs that may cause delay, such as a cache miss. This event induces a switch to another thread. This approach is effective on an in-order processor that would stall the pipeline for a delay event such as a cache miss.

Simultaneous multithreading (SMT) is a set of instruction that simultaneously issued from multiple threads to the execution units of a superscalar processor. This combines the wide superscalar instruction issue capability with the use of multithreading thread contexts.

An entire processing that replicated on a single chip and each processor handles separate threads is called Chip multiprocessing. The advantage of this approach is that the available logic area on a chip is used effectively without depending on ever-increasing complexity in pipeline design.

Interleaved multithreading and blocked multithreading instructions are different threads are not executed simultaneously. Instead, the processor is able to rapidly switch from one thread to another using a different set of registers and other context information. This results in a better utilization of the processor's execution resources and avoids a large penalty due to cache misses and other latency events.

The SMT approach involves true simultaneous execution of instruction from different threads, using replicated execution resources. Chip multiprocessing also enable simultaneous execution of instruction from different threads.

How it differs from the Von Neumann architecture

The separation between the CPU and memory leads to the von Neumann bottleneck, the limited throughput (data transfer rate) between the CPU and memory compared to the amount of memory. In modern machines, throughput is much smaller than the rate at which the CPU can work. This seriously limits the effective processing speed when the CPU is required to perform minimal processing on large amounts of data. The CPU is continuously forced to wait for vital data to be transferred to or from memory. As CPU speed and memory size have increased much faster than the throughput between them, the bottleneck has become more of a problem. The performance problem is reduced by a cache between CPU and main memory by using multiprocessor and multithreading, and by the development of branch prediction algorithms. Modern functional programming and object-oriented programming are much less geared towards "pushing vast numbers of words back and forth" than earlier languages like Fortran, but internally, that is still what computers spend much of their time doing.

Which CPU vendor uses it

The processor and cache memory used in the computer system using multi-threaded processor, which switches execution among multiple threads. A thread may be defined as a stream of addresses associated with the data and instructions of a particular sequence of code that has been scheduled within the processor.

Advantage of Multithreaded Processing

Advantages of a multi-threaded processor are it can switch threads and continue instruction execution. A missing data line should get from the main memory that provides an overall increase in throughput particularly. Instruction depends on each other's result avoid the thread use all the computing resources of CPU and runs another thread permits to not leave these inactive. If several threads work on the same set of data can share their cache that lead to better cache usage or synchronization on its values.

Drawback of the design

Computer system working with a multi-threaded processor will cause the primary cache to perform more badly which causes additional strain placed on it by the additional threads. Besides that when one thread's data is forced out of a cache for another thread's data, cache pollution happens and the overall performance of the processor may be decreased and Caches have fixed capacity.

Frequently Ask Question (FAQ).
  1. What is Multi-Threading?
  2. Multithreading is the ability of a program or an operating system process to manage its use by more than one user at a time and to even manage multiple requests by the same user without having to have multiple copies of the programming running in the computer.

  3. What are the types of Multi-threading?
  4. Basically there are 4 different types of multithreading which is Interleaved multithreading, Blocked Multithreading, Simultaneous multithreading (SMT) and Chip multiprocessing.

  5. Where does Multi-threading take place in CPU?
  6. Basically Multi-threading occur under processor and in cache memory which involve multitasking and multi-core processing.

  7. Why Multi-Threading is being used in current generation?
  8. To increase the overall performance of the processor and cache memory to give out the output.

上一篇:Muscle Building Strength 下一篇:Treatment Health Care