無標(biāo)題文章

## 簡(jiǎn)介

[Chimera: Collaborative Preemption

for Multitasking on a Shared GPU](https://scholar.google.com/citations?view_op=view_citation&hl=en&user=ieArtTcAAAAJ&citation_for_view=ieArtTcAAAAJ:2osOgNQ5qMEC)

![在這里輸入圖片描述][1]

*? ? Keywords:

*? ? Graphics Processing Unit;

*? ? Preemptive Multitasking;

*? ? ContextSwitch;

*? ? Idempotence

----------

## 問題的提出

> Preemptive multitasking on CPUs has been primarily supported through context switching. However, the same preemption strategy incurs substantial overhead due to the large context in GPUs.

由于GPU的上下文很大,因此上下文切換不適用于GPU的搶占技術(shù)

>? ? overhead comes in two dimensions: a preempting kernel suffers from a long preemption latency, and the system throughput is wasted during the switch

這里的開銷主要體現(xiàn)兩方面: 搶占延時(shí)長蜻韭,系統(tǒng)的吞吐量浪費(fèi)

## 解決方案的提出

>? ? we propose Chimera, a collaborative preemption approach that can precisely control the overhead for multitasking on GPUs

提出Chimera氧敢,一種適用于多任務(wù)GPU的協(xié)作搶占方法框杜,可以精確控制上述的開銷煌张。

>? ? Chimera can achieve a specified preemption latency while minimizing throughput overhead

Chimera 能實(shí)現(xiàn)指定的搶占延遲,同時(shí)最小化吞吐量挑格。

>? ? Chimera achieves the goal by intelligently selecting which SMs to preempt and how each thread block will be preempted.

Chimera智能選擇搶占哪個(gè)SM师幕,以及如何搶占每個(gè)線程塊

>? ? Chimera first introduces streaming multiprocessor (SM) flushing, which can instantly preempt an SM by detecting and exploiting idempotent execution

技術(shù)之一: flushing

>? ? Chimera utilizes flushing collaboratively with two previously proposed preemption techniques for GPUs, namely context switching and draining to minimize throughput overhead while achieving a required preemption latency.

技術(shù)之二: context switching,技術(shù)之三:draining

####? 技術(shù)解釋

1.? ? Context switching

>? ? Context switching [17, 29] stores the context of currently running thread blocks, and preempts an SM with a new kernel.

Context switching 是保存當(dāng)前運(yùn)行線程塊的上下文抹凳,并用新內(nèi)核搶占SM遏餐。

1.? ? Draining

>? ? Draining [12, 29] stops issuing new thread blocks to the SM and waits until the SM finishes its currently running thread blocks.

Draining 是停止分配新線程塊給SM,等待當(dāng)前線程塊運(yùn)行完赢底,再搶占該SM(彬彬有禮)失都。

1.? ? Flushing

>? ? Flushing drops the execution of running thread blocks and preempts the SM almost instantly.

Flushing 是取消正在運(yùn)行的線程塊,立即搶占SM(很粗暴)幸冻。

## 本文的contribution

1.? 分析GPU的刷新條件: 放寬冪等的語義定義

1.? 分析 搶占技術(shù)( context switching, draining, and flushing) 與線程運(yùn)行過程的定量關(guān)系

1.? Chimera的實(shí)現(xiàn): 根據(jù)不同的搶占技術(shù)的開銷來智能選擇搶占哪個(gè)SM以及如何搶占線程塊粹庞。

## 實(shí)驗(yàn)結(jié)果評(píng)估

> Evaluations show that Chimera violates the deadline for only 0.2% of preemption requests when a 15μs preemption latency constraint is used. For multi-programmed workloads, Chimera can improve the average normalized turnaround time by 5.5x, and system throughput by 12.2%

改善平均周轉(zhuǎn)時(shí)間和吞吐量。

#### 3. Architecture

##### 3.1 GPU Scheduler with PreemptiveMultitasking

An SM partitioning policy in the kernel scheduler tells

howmany SMs each kernelwill run on

Chimera consists of two parts: estimating costs of preemption

for each technique, and selecting SMs to preempt

with corresponding preempting techniques.

Chimera can directly compare the estimated

cost of each preemption technique

##### 3.2 Cost Estimation

estimate the cost of each

preemption technique precisely for each SM.

First, Chimera

measures the total number of executed instructions for each

thread block to determine the progress of each thread block

Second, Chimera also measures the progress of each

thread block in cycles

instructions-per-cycle (IPC) or cycles-per-instruction (CPI)

estimate the preemption latency of context switching

using the same method

##### 3.3 Preemption Selection

how Chimera selects a subset of

SMs and techniques to preempt.

The time complexity of algorithm 1 is O(NT logT +

NlogN),

Thus, the impact

of the selection algorithm in Chimera is negligible to the

preemption latency.

##### 3.4 SM Flushing

We relax the idempotence condition by looking at thread

blocks individually with the notion of time

4. Results

[1]: https://coding.net/api/project/178029/files/403854/imagePreview

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末洽损,一起剝皮案震驚了整個(gè)濱河市庞溜,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌趁啸,老刑警劉巖强缘,帶你破解...
    沈念sama閱讀 216,997評(píng)論 6 502
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異不傅,居然都是意外死亡旅掂,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,603評(píng)論 3 392
  • 文/潘曉璐 我一進(jìn)店門访娶,熙熙樓的掌柜王于貴愁眉苦臉地迎上來商虐,“玉大人,你說我怎么就攤上這事∶爻担” “怎么了典勇?”我有些...
    開封第一講書人閱讀 163,359評(píng)論 0 353
  • 文/不壞的土叔 我叫張陵,是天一觀的道長叮趴。 經(jīng)常有香客問我割笙,道長,這世上最難降的妖魔是什么眯亦? 我笑而不...
    開封第一講書人閱讀 58,309評(píng)論 1 292
  • 正文 為了忘掉前任伤溉,我火速辦了婚禮,結(jié)果婚禮上妻率,老公的妹妹穿的比我還像新娘乱顾。我一直安慰自己,他們只是感情好宫静,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,346評(píng)論 6 390
  • 文/花漫 我一把揭開白布走净。 她就那樣靜靜地躺著,像睡著了一般孤里。 火紅的嫁衣襯著肌膚如雪伏伯。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,258評(píng)論 1 300
  • 那天扭粱,我揣著相機(jī)與錄音舵鳞,去河邊找鬼。 笑死琢蛤,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的抛虏。 我是一名探鬼主播博其,決...
    沈念sama閱讀 40,122評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼迂猴!你這毒婦竟也來了慕淡?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 38,970評(píng)論 0 275
  • 序言:老撾萬榮一對(duì)情侶失蹤沸毁,失蹤者是張志新(化名)和其女友劉穎峰髓,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體息尺,經(jīng)...
    沈念sama閱讀 45,403評(píng)論 1 313
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡携兵,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,596評(píng)論 3 334
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了搂誉。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片徐紧。...
    茶點(diǎn)故事閱讀 39,769評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出并级,到底是詐尸還是另有隱情拂檩,我是刑警寧澤,帶...
    沈念sama閱讀 35,464評(píng)論 5 344
  • 正文 年R本政府宣布嘲碧,位于F島的核電站稻励,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏愈涩。R本人自食惡果不足惜钉迷,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,075評(píng)論 3 327
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望钠署。 院中可真熱鬧糠聪,春花似錦、人聲如沸谐鼎。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,705評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽狸棍。三九已至身害,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間草戈,已是汗流浹背塌鸯。 一陣腳步聲響...
    開封第一講書人閱讀 32,848評(píng)論 1 269
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留唐片,地道東北人丙猬。 一個(gè)月前我還...
    沈念sama閱讀 47,831評(píng)論 2 370
  • 正文 我出身青樓,卻偏偏與公主長得像费韭,于是被迫代替她去往敵國和親茧球。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,678評(píng)論 2 354

推薦閱讀更多精彩內(nèi)容

  • 中國對(duì)韓國星持,長沙抢埋,贏了! 雖然我不看足球督暂,也看不懂足球揪垄,但這中韓關(guān)系這么緊急的時(shí)刻,我還是比較關(guān)心這件大事的逻翁,...
    一路李花開閱讀 198評(píng)論 0 0
  • 昨天佐佐木希結(jié)婚的話題在微博上掛了一天饥努,如大多數(shù)人的反應(yīng)一樣,我的第一反應(yīng)也是佐佐木希是誰卢未?刷不盡的美圖也只是讓我...
    不不不不不自覺閱讀 514評(píng)論 1 1
  • 題目來源刪除二叉搜索樹的一個(gè)節(jié)點(diǎn)肪凛。題目確實(shí)不難堰汉,不過我寫的有點(diǎn)亂,而且一開始沒有考慮那么多東西伟墙,錯(cuò)了好多次才AC的...
    我叫膽小我喜歡小心閱讀 163評(píng)論 0 0