Memory management

EventHorizon

What is this storage?
Joined
Mar 6, 2002
Messages
2
I'm studying ICT at Groep T (Leuven, Belgium). I have to make a paper about the memory system of my computer (Pentium4 1.60 GHz with 256MB SDRAM (os: WinMe). Where can I find information about swapping, virtual memory, pagination, ... of my system?!
 

Tannin

Storage? I am Storage!
Joined
Jan 15, 2002
Messages
4,448
Location
Huon Valley, Tasmania
Website
www.redhill.net.au
Makes me realise just how much of the computing world has passed me by. I used to be something of an expert at memory management in DOS days. Now, I know almost nothing. Don't seem to need to know it day to day anymore - which, now that I come to think of it, is evidence that MS have improved some things.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
21,607
Location
I am omnipresent
Not really. Ever gotten an "out of memory" error on a 9x machine with a half-gig of RAM?

What that usually means is that you're out of GDI memory, which IIRC is just a little 32 or 64k stack for making widgets on your screen, but Windows should still be able to handle that RAM properly.

Other funnies, realizing that your Windows machine, with a half-gig of RAM and nothing open but Explorer, is using 150MB of swap space (or even worse, growing the swap file), or finding that there are Netscape 4.x sessions that you closed DAYS ago that still have some memory allocated to them.

It's better than it was. It's still not all that good.

But then, it's better than the good old days of EMS/XMS, the lower 640k... ugh. That was awful.
 

Tannin

Storage? I am Storage!
Joined
Jan 15, 2002
Messages
4,448
Location
Huon Valley, Tasmania
Website
www.redhill.net.au
Mercutio said:
Not really. Ever gotten an "out of memory" error on a 9x machine with a half-gig of RAM?
Oh yes, often. Usually on machines that have ICQ, MSM, Bonzo Internet Buddy, Office startup, Office slugfind, three different anti-virus programs (all out of date), Norton Crashguard, scanner drivers, Lexmark printer crap, 17 instances of the scheduler, and a host of other assorted garbage in their start-up. Also, 231k free on their 10GB C: drive, icons scrolling off the side of the desktop, MS Jungle theme playing the national anthem every time you open a folder, "view as web page" enabled everywhere, a stupid Genius mouse with its drivers breaking everything ....

...... and they want it fixed by the weekend without spending more than $5 and without loosing their precious, beautiful Windows install. And it arrives at 4:48PM on Friday.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
21,607
Location
I am omnipresent
That's 256 bytes, not 32k, as I previously thought.
Hardly worthy of the resource meter, is it?

Anyhow, msconfig is your friend. Any machine that you get in that condition can damn well be put back into it when you're done fixing the actual problem. That's how I see things.

Windows installs precious? A re-install is an utterly non-destructive event, unless you're doing something rash like a del *.da? in C:\Windows prior to starting your work.
 

Tannin

Storage? I am Storage!
Joined
Jan 15, 2002
Messages
4,448
Location
Huon Valley, Tasmania
Website
www.redhill.net.au
Since MSCONFIG arrived with Windows 98, this stuff has become way easier. But not everything shows up in it, of course. (Hey, this is Microsoft - what do we expect?) Severe cases we deal with using the following batch file, which lives on all our workshop floppy discs:

Code:
c:
cd\
cd progra~1
deltree intern~1
deltree netmee~1
deltree outloo~1
deltree online~1
deltree uninst~1
deltree c:\windows

Works like a charm. With Windows Moron Edition, you have to deltree c:\progra~1\common~1 too, beause ME puts crap in there that doesn't allow a fresh install of SE to take cleanly. (Yes, wherever possible, we always recommend upgrading from ME to SE.)


But MSCONFIG only works on Windows 98. You can run it on Windows 95 too, by copying MSCONFIG.EXE from a 98 machine, but it needs certain other things to be there first. IE 5.0, I think.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
21,607
Location
I am omnipresent
OS/2 5.0? Or the crappy motherboard? Or some other ECS I'm not thinking of.

ECS and Windows NT probably share the lion's share of memory management code.
 

Corvair

Learning Storage Performance
Joined
Jan 25, 2002
Messages
231
Location
Desolation Boulevard
> Memory management

I've always resorted to mnemonics for such.

Examples: Tannin is a Tea product. Tea: T. T for Tony. Tony the Tiger. Sugar frosted flakes. Bowl of cereal. Breakfast: morning. Morning: morningtime. Morningtime means time to log onto Storage Forum. Storage Forum: Tannin is logged in. Tannin is a Tea product. Tea: T. T for Tony. Tony the Tiger. Sugar frosted flakes....
 

Tannin

Storage? I am Storage!
Joined
Jan 15, 2002
Messages
4,448
Location
Huon Valley, Tasmania
Website
www.redhill.net.au
In this context, I think we are talking about the effective but abominably named Ecomstation 1.0 which is, more or less, OS/2 5.0. It actually comprises an oddball mix of IBM's OS/2 4.5 code under IBM licence, a couple of service patches to that, a large miscellany of third-party add-ons, drivers, and customisations (all integrated and dovetailed neatly in so that you just install the whole damn thing in one hit), and Serenity Software's own "managed client pack" which is a very nifty way to organise the roll-out of any number of seperate and different but related installatons of OS, drivers, desktop look and feel, and applications with a minimum of effort.

I confess, I haven't bothered to take a few hours to learn to use the managed client part properly (I'm mouse-challenged, remember, much better with command lines) because with only one ECS system to set up, it's easier, or at least more brainless, for me to just install the OS, add drivers, load apps, and customise the look and feel in the old-fashioned way. If I had to do three or four systems, I'd go that way in a flash. It's their managed client app that makes it possible for them to install all those seamless enhancements by default, and lets you pick and choose exactly which ones you want and don't want.

So, in short, I guess it's reasonable to regard ECS 1.0 as OS/2 5.0.

Memory management with OS/2 family products is something I ought to know all about, seeing as I have been using OS/2 as my primary OS since version 2.1, which was 1992, if my memory is not playing tricks on me. In reality, I know almost nothing at all about it, as it is practically impossible to need to know anything about it. It just works. By default, OS/2 gives you a vast amount of memory to work with and uses the swap file to provide more if needed without the user ever having to bother with it. You can download all sorts of nifty memory watchdog software (come to think of it, even the old 2.1 had these functions right out of the box if you dug down into the menu structure) but I never bother . I don't need to know how much free RAM I have, because there is always enough.

Is the memory management code shared with Windows NT? Some of it probably is, but not all, as it's quite difficult to run out of memory on NT or Win2K but bloody near impossible to run out with OS/2. So something must be different. When NT 3.1 first came out, I regarded it as a sort of poor man's OS/2. Nothing in the eight years or so since then, or in the various new incarnations of NT renamed to something sexy, has made me change my mind about that.
 

Tannin

Storage? I am Storage!
Joined
Jan 15, 2002
Messages
4,448
Location
Huon Valley, Tasmania
Website
www.redhill.net.au
Essentially, each task runs in its own memory space. If you need it, there is a phenomenal amount of customizaton you can do. Here, for example, is a screenshot of the memory customisation setings notebook for my beloved old spreadsheet of choice, Quattro Pro. Notice that I've given it 128MB of DPMI (DOS Protected Mode Interface) memory, which is vastly more than it really needs, but what the hell - it only gets allocated if it's needed, but no EMS and no XMS - because seeing as QPW is a DPMI-aware app, DPMI is the most efficient sort of memory you can give it.

os2memman-small.jpg


Notice also the "seperate session" tick-box. Quattro is one of my most vital apps, so it gets an entire virtual X86 computer all to itself. I can crash anything else, even another Windows 3.1 app or Windows itself, and the Quattro session is completely untouched. In the old days, this was something you only did for really vital apps, as each seperate session consumed about 4 to 8MB of RAM, and in a 16MB or 32MB system, you could start some heavy swap-file hitting all too easily.

These days, of course, hitting the swap file is a non-issue, (a) because I have 512MB of physical RAM, and (b) because the X15 the swap file lives on is probably damn near as quick as the 30-pin fast page RAM in my old 386DX-40 used to be. (Well, not quite, but it's getting on for the same order of magnitude now. By the time you allow for the massive improvement in CPU speeds and main board data transfer rates since 386 days, it's probably faster to swap from the X15 than it used to be to page through RAM.)

But you are all yawning! "Hey", you say, "Windows 2000 can do about 60-80% of that stuff.", Quite right. But I was doing this stufff in 1992. And thanks to the hard yards that IBM put in back around the start of the 1990s, I can still do it better than any Windows user can.

</soapbox>

(And don't blame me for the rant - blame Cliptin for asking!)
 

EventHorizon

What is this storage?
Joined
Mar 6, 2002
Messages
2
More questions about memory menagement

I've already find how much cache a P4 has (L1 8kb data, L1 12kb instruction and L2 256 kb). But i've a verry specific question: at home, i've a P4 with 511MB PC133 SDRAM, and i want to now how my cpu handels a context switch with the cache. How much kb is a page in this cache? (I know, i've much annoying questions... But hey, if i don't ask, i can't learn...)
 
Top