Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
LINUX系統程式設計 第二版
by
Robert Love
December 2013
Intermediate to advanced
496 pages
8h 57m
Chinese
GoTop Information, Inc.
Content preview from
LINUX系統程式設計 第二版
檔案
I/O
|
67
多。
8
使用
poll()
則可建立一個大小剛好的陣列。你只要檢視一個項目,而且只須傳
遞單一結構。
•
使用
select()
,會在返回時重新建構「檔案描述器」分組,所以每個隨後的呼叫必
須重新設定它們。
poll()
系統呼叫則會把輸入(
events
欄位)與輸出(
revents
欄
位)分離,並允許重複使用陣列而不需要變更。
•
返回後,
select()
的
timeout
參數會變成未定義。所以具移植性的程式碼需要重新對
它進行初始設定。然而,若使用
pselect()
則不會遇到這個問題。
但是
select()
系統呼叫卻具有以下優點:
•
select()
較具移植性,因為有些
Unix
系統並不支援
poll()
。
•
select()
提供了較佳的
timeout
(逾時)解析度:可以準確到微秒,而
poll()
只能提
供毫秒的解析度。儘管
ppoll()
與
pselect()
理論上可以提供奈秒的解析度,但實際
上,它們甚至無法可靠地提供微秒的解析度。
我們將在第
4
章探討優於
poll()
與
select()
的
epoll
介面,這是一個
Linux
特有的多工
式
I/O
解決方案。
核心內部
本節將探討
Linux
核心實作
I/O
的方式,重點擺在核心的三個主要子系統:
虛擬檔案
系統
(
virtual filesystem
,簡稱
VFS
)、
頁面快取區
(
page cache
)以及
頁面寫回
(
page
writeback
)。總的來說,這些子系統可以協助我們進行無縫、高效和優化的
I/O
。
第
4
章將探討第
4 ...
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.
Start your free trial
You might also like
優雅的SciPy|Python科學研究的美學
Juan Nunez-Iglesias, Stéfan van der Walt, Harriet Dashnow
成為卓越程式設計師的38項必修法則
Pete Goodliffe
深入理解運算原理|從簡單的機器到無所不能的程式
Tom Stuart
C++语言导学(原书第2版)
本贾尼 斯特劳斯特鲁普
Publisher Resources
ISBN: 9789862769812