Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Why pageins without pageouts?

Why pageins without pageouts?
Thread Tools
Dedicated MacNNer
Join Date: Jun 2001
Location: Madrid
Status: Offline
Reply With Quote
Feb 13, 2003, 08:01 AM
 
Hi!

Just curious. When I look at the terminal I see that there are no pageouts what seems logical as I have 1GB Ram and do not open to many apps at once. But there are always pageins. I must have understood something wrong because I thought a pageout happens when there in not enough Ram. Some memory gets written to disk and other is loaded from disk. But then how can the system load information that hasnīt been previously written to disk?

Thanks.
Check out www.basasoft.com products:
CodeLine (Do Cocoa programming in BASIC)
BasaOne 2.0
AFDragHandler 1.1
BasaOne Web Classes
     
Senior User
Join Date: Nov 2000
Status: Offline
Reply With Quote
Feb 13, 2003, 08:16 AM
 
In Unix operating systems you can "map" a file into memory. This means that a chunk of memory is allcoated and is marked as having the contents as what is on disk in a certain location, but it does not copy that data directly into memory.

This means you've now got some memory allocated, with data on disk that must be paged in, and yet nothing has been paged out to disk. So, obviosuly, if you want to use that data you have to page in data from disk to use it.

One of the ways of mapping files into memory is the mmap(2) system call for those interested in looking around.

- proton
     
Dedicated MacNNer
Join Date: Jun 2001
Location: Madrid
Status: Offline
Reply With Quote
Feb 13, 2003, 08:20 AM
 
Ok. Thanks!

Some my error was to think that paging is only done to allocate more "memory" but it can also be used as a type of cache for file access.
Check out www.basasoft.com products:
CodeLine (Do Cocoa programming in BASIC)
BasaOne 2.0
AFDragHandler 1.1
BasaOne Web Classes
     
Fresh-Faced Recruit
Join Date: May 2002
Status: Offline
Reply With Quote
Feb 13, 2003, 08:09 PM
 
also, remember that many unix systems (probably, but I'm not sure, including OS X) use such a system to get programs in.

That is, when you start a process, the system maps the executable, then says go. On "go", the system says, "wait, that memory's not in, I'll go page it in." And off we go...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:38 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2