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系統程式設計 第二版
第四章
進階檔案 I/O
2 章,我們看過了 Linux 的基本 I/O 系統呼叫。這些呼叫不僅是檔案 I/O 的基礎,也
Linux 上所有通訊的基礎。第 3 章,我們看過了基本 I/O 系統呼叫之上常常需要用到
「用戶空間緩衝機制」(user-space buffering),而且我們還研究了一個用戶空間緩衝方
案,也就是 C 語言的標準 I/O 程式庫。本章,我們將探討 Linux 所提供之較進階的 I/O
系統呼叫:
分散
聚集
I/Oscatter/gather I/O
讓單一呼叫得以同時對多個緩衝區進行資料的讀取或寫入操作;可用於把不同資料
結構的欄位聚集成單次 I/O 操作。
事件輪詢
event poll
簡稱
Epoll
用於改善第 2 章所提到的
poll()
select()
系統呼叫;若有需要從單一執行緒來輪
詢上百個檔案描述器,則可以使用此介面。
記憶體映射
I/Omemory-mapped I/O
把一個檔案映射至記憶體,讓檔案 I/O 得以透過簡單的記憶體操作來進行;可用於
特定類型的 I/O
檔案指示
file advice
讓一個行程得以提示核心,自己的使用情況;如此可改善 I/O 的效能。
非同步
I/Oasynchronous I/O
允許一個行程送出 I/O 要求,而不需要等待它們完成;可在不使用執行緒的情況
下,操弄沈重的 I/O 工作量。
本章結束時將討論效能的問題以及核心的 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