On Tue, Mar 20, 2007 at 05:34:03PM +0530, pradeep singh wrote:
> >> since there is an open and a close related to every VMA struct for a
> >> process address space, does this means vm_area_struct for a process's
> >> address space is treated like a file?( in terms with the philosophy of
> >> almost everything is file :) ) .
> >
> >Open and close are called when a region is created and deleted
> >respectively.
> >no_page is used during page faults for locating the pages and
> >allocating it if needed etc.
>
> Ok got it.
>
> >
> >> Does it means accessing a virtual address space for a process is not
> >> allowed if open fails or is not allowed?( suppose i do that
> >> delibarately in my module ).
> >
> >if open fails then it should mean that the region is not created how
> >would you access it then?
>
> So, another question who defines these functions?
> Broadly speaking ,Is it the job of the device driver writer?
> I think no and yes :(
Yes, it is. Though it can be left empty.
LDD3 Chapter 15 discusses this topic in a very clean way, check it :).