Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

You will be awarded the Nobel Peace Prize... posthumously.


comp / comp.unix.questions / File I/O and copying

SubjectAuthor
o File I/O and copyingSteve Keller

1
Subject: File I/O and copying
From: Steve Keller
Newsgroups: comp.unix.questions
Organization: Aioe.org NNTP Server
Date: Fri, 8 Feb 2019 11:39 UTC
Path: eternal-september.org!news.eternal-september.org!reader01.eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.+ig+4JBTiItVT1HSpocy/w.user.gioia.aioe.org!not-for-mail
From: keller@no.invalid (Steve Keller)
Newsgroups: comp.unix.questions
Subject: File I/O and copying
Date: Fri, 08 Feb 2019 12:39:48 +0100
Organization: Aioe.org NNTP Server
Lines: 13
Message-ID: <q3jpq4$3ks$1@gioia.aioe.org>
NNTP-Posting-Host: +ig+4JBTiItVT1HSpocy/w.user.gioia.aioe.org
X-Complaints-To: abuse@aioe.org
X-Notice: Filtered by postfilter v. 0.9.2
View all headers

I'd like to understand how file I/O is typically handled on todays PCs
or servers running any modern Unix (*BSD, Linux, etc.).

How much copying is involved when I read from a file using the read
system call? And does this depend on alignment of my user space
buffer that I read into?

Can the I/O hardware and block device driver (maybe using DMA) copy
directly to user space, and if so to any address or are there
alignment constraints? Or is data copied to a kernel buffer first and
then copied to user space?

Steve

1

rocksolid light 0.9.8
clearnet tor