Skip to Content
LINUX系統程式設計 第二版
book

LINUX系統程式設計 第二版

by Robert Love
December 2013
Intermediate to advanced
496 pages
8h 57m
Chinese
GoTop Information, Inc.
Content preview from LINUX系統程式設計 第二版
140
|
第四章
此外,目錄
/sys/block/[device]/queue/iosched
中所包含的檔案,讓管理者得以取得以及設
定與 I/O 排班器有關的可調整值。至於要操作哪些選項,取決於當前所使用的 I/O 排班
器。欲變更任何設定值,必須具備 root 的特權。
一個好的程式設計者,並不需要瞭解底層的 I/O 子系統。儘管如此,對這個子系統有所
認識,將有利於程式的優化。
優化 I/O 效能
因為相對於系統中其他元件而言,磁碟 I/O 的速度是如此緩慢,然而 I/O 卻是現代電腦
技術一個重要的面向,所以 I/O 效能的最大化至關重要。
儘量減少 I/O 操作(將許多規模較小的操作,凝聚成少數規模較大的操作)、進行對齊
區塊大小的 I/O 或是採取用戶緩衝機制(見第 3 章)是系統程式設計者之工具箱中重要
的工具。同樣的,進階 I/O 技術,例如向量式 I/O、特定位置的 I/O(見第 2 章)、非同
I/O,也是進行系統程式設計時,必須加以考量的重要模式。
然而,I/O 密集的關鍵應用程式,則可以利用額外的技巧來最大化效能。儘管 Linux
心,正如先前所提到的,會利用進階的 I/O 排班器來儘量減少可怕的磁碟查找操作,不
過用戶空間應用程式也可以朝向相同的目標,使用類似的方式,以進一步改善效能。
用戶空間中的 I/O 排班
I/O 密集應用程式會發出大量的 I/O 要求,而且需要花時間排序及合併其未決之 I/O
求,進行跟 Linux I/O 排班器一樣的工作。
8
如果你知道 I/O ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

AGILE學習手冊 | SCRUM、XP、精實和看板方法

AGILE學習手冊 | SCRUM、XP、精實和看板方法

Andrew Stellman, Jennifer Greene
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey
算法技术手册(原书第2 版)

算法技术手册(原书第2 版)

George T.Heineman, Gary Pollice, Stanley Selkow

Publisher Resources

ISBN: 9789862769812