- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Read or write process explained
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-13-2010 03:13 AM
тАО08-13-2010 03:13 AM
I was trying to understand, the whole process for a read or write system call, since it is called by the process until it receives it back from disk.
Could you point me to a good doc, or kindly explain it here.
Just to list what more or less I understand, it could be completely wrong
Process read system call read()
the process does a voluntary Context Switch and sleeps until the io returns
Looks in all the levels of CPU cache
Looks in the data buffer cache
if not in buffer cache it goes to the FS
FS(jfs) checks the inode info on the file to read
goes through lvm
multipathing software if exists
fiber channel cards(if san)
and finally to the disk
all the way up the stack again
the read data goes into the buffer cache
and form here :?
thanks!.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-13-2010 06:02 AM
тАО08-13-2010 06:02 AM
Re: Read or write process explained
Process read system call read()
the process does a voluntary Context Switch and sleeps until the io returns
Looks in all the levels of CPU cache
Looks in TLB for the pages
Looks in memory for the pages
If not in memory a Page fault happens
Looks in the data buffer cache
if not in buffer cache it goes to the FS
FS(jfs) checks the inode info on the file to read
goes through lvm
multipathing software if exists
fiber channel cards(if san)
and finally to the disk
all the way up the stack again
the read data goes into the buffer cache
and form here :?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2010 07:13 AM
тАО08-14-2010 07:13 AM
SolutionOnly the CPU looks in its cache and it only would be a side effect of looking in the file cache.
>Looks in TLB for the pages
>Looks in memory for the pages
>If not in memory a Page fault happens
Again a side effect of looking in the file cache.
Basically these 4 areas are used to load data, not directly for read(2)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2010 10:54 PM
тАО08-15-2010 10:54 PM
Re: Read or write process explained
Thnx for the answer, so if I understand you correctly, when you issue a read or a write system call, you bypass all these steps:
Looks in all the levels of CPU cache
Looks in TLB for the pages
Looks in memory for the pages
If not in memory a Page fault happens
And it goes directly to look in the Buffer Cache.
And when the process needs to load into memory program data, then it does all the steps.
So just to resume, as seems logical, all the data that read and write gets from disk never goes into memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2010 04:31 AM
тАО08-16-2010 04:31 AM
Re: Read or write process explained
>And it goes directly to look in the Buffer Cache.
>And when the process needs to load into memory program data, then it does all the steps.
Yes. But once it looks in the buffer/file cache, it then does those steps.
>all the data that read and write gets from disk never goes into memory.
Sure it goes into memory. It has to go somewhere and that's into memory. Whether into the buffer/file cache or directly into the user's buffer.