Re: process memory and page cache clarification is needed
From: hopehope_123 (hopehope_123_at_yahoo.com)
Date: 09/26/05
- Next message: Martin Paul: "Re: What is new in Solaris 9 09/05?"
- Previous message: gvelmurugan_at_gmail.com: "Re: How I can Change TimeZone"
- In reply to: Anton Rang: "Re: process memory and page cache clarification is needed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 Sep 2005 06:25:49 -0700
Hi Anton ,
Thanks for your mail.
Can we say that For directio (this is what i really use , both on ufs
and also on ocfs - oracle clustered file system) , based on your mail ,
only step 1 and 4 exist?
-If you read from a file using read(), the file pages are not mapped
-into the process's address space at all. They are mapped temporarily
-by the kernel and then the data is copied into the process's buffer.
Here , 'the data is copied into the process's buffer' means process
heap segment (as anon pages ) doesnt it?
At this point ,
i know that when a process reads a file , heap segment is the place
that is used to hold the file data.
If i use directio, instead of using page cache , the data is directly
read from the disk into the process .
*buf=65;
This modification also means modification in heap segment , and if it
is necessary it can be paged out to swap disk.
At this point , now consider , i modify the file by using the contents
of the buffer:
pwrite(18,buf, 16384, 1506574336) = 16384
according to the all these things , I think , If the memory which
stores the buf is pagedout at the time of this call , then first of all
it must be paged in. This has no relation with disk file and page
cache. ( )
If file is cached inside the page cache , then it must be updated
inside the page cache , (I think these are the pages which are created
at step 2) (the kernel updates these cached data inside the kernel
address space ,) then these pages must be written to the data file on
the disk .At this time we know that there exists some memory pages
inside the page cahce which are dirty and hold file system data. Now if
operating system needs to use these pages , how does it behave? Does
the operating system page out these data pages by writing them to the
data file (not swap file) in order to make them free?
Kind Regards,
tolga
- Next message: Martin Paul: "Re: What is new in Solaris 9 09/05?"
- Previous message: gvelmurugan_at_gmail.com: "Re: How I can Change TimeZone"
- In reply to: Anton Rang: "Re: process memory and page cache clarification is needed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|