Implicit and Explicit Multithreading MULTITHREADING AND CHIP MULTIPROCESSORS
COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION
The concept of thread used in discussing multithreaded processors may or may not
be the same as the concept of software threads in a multiprogrammed operating
system. It will be useful to define terms briefly:
• Process: An instance of a program running on a computer. A process embod-
ies two key characteristics:
— Resource ownership: A process includes a virtual address space to hold the
process image; the process image is the collection of program, data, stack,
and attributes that define the process. From time to time, a process may
be allocated control or ownership of resources, such as main memory, I/O
channels, I/O devices, and files.
— Scheduling/execution: The execution of a process follows an execution
path (trace) through one or more programs. This execution may be inter-
leaved with that of other processes. Thus, a process has an execution state
(Running, Ready, etc.) and a dispatching priority and is the entity that is
scheduled and dispatched by the operating system.
• Process switch: An operation that switches the processor from one process to
another, by saving all the process control data, registers, and other information
for the first and replacing them with the process information for the second.
• Thread: A dispatchable unit of work within a process. It includes a processor
context (which includes the program counter and stack pointer) and its own data
area for a stack (to enable subroutine branching). A thread executes sequen-
tially and is interruptible so that the processor can turn to another thread.
• Thread switch: The act of switching processor control from one thread to an-
other within the same process. Typically, this type of switch is much less costly
than a process switch.
Thus, a thread is concerned with scheduling and execution, whereas a process
is concerned with both scheduling/execution and resource ownership. The multi-
ple threads within a process share the same resources. This is why a thread switch
is much less time consuming than a process switch. Traditional operating systems,
such as earlier versions of UNIX, did not support threads. Most modern operating
systems, such as Linux, other versions of UNIX, and Windows, do support thread.
A distinction is made between user-level threads, which are visible to the applica-
tion program, and kernel-level threads, which are visible only to the operating sys-
tem. Both of these may be referred to as explicit threads, defined in software.
All of the commercial processors and most of the experimental processors so
far have used explicit multithreading. These systems concurrently execute instruc-
tions from different explicit threads, either by interleaving instructions from dif-
ferent threads on shared pipelines or by parallel execution on parallel pipelines.
Implicit multithreading refers to the concurrent execution of multiple threads
extracted from a single sequential program. These implicit threads may be defined
either statically by the compiler or dynamically by the hardware. In the remainder
of this section we consider explicit multithreading.
2
The term context switch is often found in OS literature and textbooks. Unfortunately, although most of
the literature uses this term to mean what is here called a process switch, other sources use it to mean a
thread switch. To avoid ambiguity, the term is not used in this book.

Implicit and Explicit Multithreading MULTITHREADING AND CHIP MULTIPROCESSORS的更多相关文章
- C++雾中风景5:Explicit's better than implicit.聊聊Explicit.
关于Explicit还是Implicit一直是编程语言中能让程序员们干起架的争议.那些聪明的老鸟总是觉得Implicit的规则让他们能够一目十行,减少样板代码的羁绊.而很多时候,Implicit的很多 ...
- 【转】C#中的implicit 和 explicit
The implicit and explicit keywords in C# are used when declaring conversion operators. Let's say tha ...
- MULTITHREADING AND CHIP MULTIPROCESSORS
COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION The most important me ...
- implicit和explicit的基本使用
class MyAge { public int Age { get; set; } public static implicit operator MyAge(int age) { return n ...
- C# 自己定义 implicit和explicit转换
explicit 和 implicit 属于转换运算符,如用这两者能够让我们自己定义的类型支持相互交换explicti 表示显式转换.如从 A -> B 必须进行强制类型转换(B = (B)A) ...
- C#之自己定义的implicit和explicit转换
在类型转换时常会遇到隐式转换和显式转换.那我们自己定义的类型要怎样去定义隐式转换和显式转换?我们来看一段代码 public class Rational { private Int32 _inner_ ...
- implicit和 explicit关键字
implicit 关键字用于声明隐式的用户定义类型转换运算符. 如果可以确保转换过程不会造成数据丢失,则可使用该关键字在用户定义类型和其他类型之间进行隐式转换. class Digit { publi ...
- 操作符(运算符)重载 或者叫 二元运算符 operator + 与 转换式操作符 implicit operator explicit operator
static void Main(string[] args) { rational r1 = new rational(5); rational r2 = new rational(51); rat ...
- C#自定义转换(implicit 或 explicit)
C#的类型转换分为显式转换和隐式转换,显式转换需要自己声明转换类型,而隐式转换由编译器自动完成,无需我们声明,如: //long需要显式转换成int long l = 1L; int i = (int ...
随机推荐
- iOS开发UI篇—CAlayer(创建图层)
iOS开发UI篇—CAlayer(创建图层) 一.添加一个图层 添加图层的步骤: 1.创建layer 2.设置layer的属性(设置了颜色,bounds才能显示出来) 3.将layer添加到界面上(控 ...
- LeetCode之344. Reverse String
------------------------------- Java也可以实现一行代码反转字符串哦 AC代码如下: public class Solution { public String re ...
- 如何从零基础学习VR
转载请声明转载地址:http://www.cnblogs.com/Rodolfo/,违者必究. 近期很多搞技术的朋友问我,如何步入VR的圈子?如何从零基础系统性的学习VR技术? 本人将于2017年1月 ...
- Build2016上值得一看的大数据相关Session
(此文章同时发表在本人微信公众号"dotNET每日精华文章",欢迎右边二维码来关注.) 题记:Build2016开完很久了,现在才来回顾下,就说说那些和大数据相关的Session, ...
- (一)洞悉linux下的Netfilter&iptables:什么是Netfilter?
转自:http://blog.chinaunix.net/uid-23069658-id-3160506.html 本人研究linux的防火墙系统也有一段时间了,由于近来涉及到的工作比较纷杂,久而久之 ...
- Codeforces 307 div2 E.GukiZ and GukiZiana 分块
time limit per test 10 seconds memory limit per test 256 megabytes input standard input output stand ...
- iOS--NSBundle理解
NSBundle:官方文档解释:An NSBundle object represents a location in the file system that groups code and r ...
- iOS 为label加删除线
NSString *oldPrice = [NSString stringWithFormat:@"原价 %@",_item.previousPrice.stringValue]; ...
- CSS 百分比 margin & padding
前段时间我同事对于margin和padding应用百分比值似乎有些误解,觉得可能是个普遍问题,所以觉得有必要拿出来单独写一下. margin和padding都可以使用百分比值的,但有一点可能和通常的想 ...
- python操作mongodb数据库
一.MongoDB 数据库操作 连接数据库 import pymongo conn = pymongo.Connection() # 连接本机数据库 conn = pymongo.Connection ...