<< Back to previous view

[QA-12] Do read()/write() system calls block users in physical IO ? Created: 15/Jul/07  Updated: 16/Sep/07

Status: Closed
Project: Questions & Answers
Fix Version/s: None

Type: Oracle - Operating System Priority: Major
Reporter: ubTools Support Assignee: ubTools Support
Resolution: Answered Votes: 0

Product Version: ???
Operating System: Generic

 Description   
do read()/write() system calls block users until physical IO to disk is completed ?

 Comments   
Comment by ubTools Support [ 15/Jul/07 01:35 PM ]
There is a common misconseption that read()/write() system calls block users until physical IO to disk is completed.

read()/write() system calls do not block users during pyhsical IO unless file is opened with O_DIRECT or O_SYNC flags. Users are blocked just during copying buffers from/to user address space to/from kernel address space. So, although read()/write() calls look synchronous in user perspective, they don't do physical IO as synchronously.

In Asynchronous IO calls(i.e aio_read()/aio_write()), users are just blocked during enqueuing IO requests, not during copying buffers from/to user address space to/from kernel address space and not during physical IO.

Generated at Sat Dec 27 15:53:51 UTC 2025 using JIRA Standard Edition, Version: 3.12.3-#302.