History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QA-12
Type: Oracle - Operating System Oracle - Operating System
Status: Closed Closed
Resolution: Answered
Priority: Major Major
Assignee: ubTools Support
Reporter: ubTools Support
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Questions & Answers

Do read()/write() system calls block users in physical IO ?

Created: 15/Jul/07 01:34 PM   Updated: 16/Sep/07 04:29 PM
Fix Version/s: None

Product Version: ???
Operating System: Generic


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

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
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.