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系統程式設計 第二版
48
|
第二章
O_DSYNC
旗標指出每次寫入操作之後只有一般資料需要同步,而中介資料無此需要。你
可以把它想成是,這會導致每次寫入要求之後自動呼叫
fdatasync()
。因為
O_SYNC
提供
了有力的保證,讓
O_DSYNC
成為
O_SYNC
的別名,功能上並不會有任何的損失;在
O_SYNC
所提供的有力規定之下,僅會有潛在的效能損失。
O_RSYNC
旗標指出讀取要求以及寫入要求皆需要同步。它必須從
O_SYNC
或
O_DSYNC
擇一
使用。如稍早所述,讀取操作已經是同步的了—它們不會返回,除非它們能夠把資料提
供給用戶。
O_RSYNC
旗標規定讀取操作的任何副作用也需要同步。這意味著,讀取操作
所造成的中介資料變動,也必須在從呼叫返回之前寫入磁碟。具體而言,這項規定最有
可能的應用是,從
read()
呼叫返回之前,必須更新
inode
位於磁碟上之副本的檔案存取
時間。
Linux
把
O_RSYNC
定義成如同
O_SYNC
,雖然這麼做的意義不大(
O_RSYNC
與
O_SYNC
之間並不存在
O_DSYNC
與
O_SYNC
之間的子集關係)。在
Linux
中,目前並沒有辦法獲得
O_RSYNC
的正確行為;開發者所能獲得之最接近的行為是,在每次
read()
呼叫之後調用
fdatasync()
。但是,需要用到此行為的場合並不多。
直接
I/O
Linux
核心,如同任何現代的作業系統核心,為裝置與應用程式之間的快取機制、緩衝
機制以及
I/O
管理實作了一個複雜的層級架構(見第
2
章〈核心內部〉一節)。效能高
的應用程式可能會想要繞過複雜的層級架構,以便進行自己的 ...
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