The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
You really need to read up on how Windows manages memory. I suggest reading this[^] and watch this[^].
Windows gives every process the illusion that it's the only process running on the system, along with the Windows Kernel. The total address space for this process is 4GB. The total amount of usable memory by the process is 2GB (default), though this can be increased to 3GB, but at a cost.
How can more than one process with a 4GB address space exist on a system with only 4GB of RAM?? Memory mapping and paging. Not every page of memory is used and not every page of used memory needs to be in RAM at the same time. Windows performs a juggling act to keep only the stuff that needs to be in RAM there and tracks all the stuff that doesn't need to be in RAM in the infamous "pagefile".
The reason you can't have more than 4GB of ram in a 32-bit system (without cheating) is because a 32-bit unsigned integer can only count up to 4,294,967,295, which represents 4GB of address space. PAE address a new layer to the memory model that cheats to increase the address space to 57-bits using something akin to segmenting in the old x86 architecture. The rpoblem with using this is that the hardware (motherboard and CPU) have to properly implement PAE and Windows has to implement support for it, AND an application wishing to take advantage of it must be specifically written to do so.
The .NET Framework is a kind of virtual machine environment, kind of like Java is. The .NET CLR is not written to take advantage of PAE, and so any code you write that targets the .NET Framework will not be able to use it either.
Very, very few applications use PAE because the vast majority of users of these applications will never need its capabilities.
The two links are good. I already knew most of what was presented there, but did learn a few new things (thanks).
However this doesn't contradict my earlier statements. Indeed, when a 32 bit pointer is used, the address space described is limited to 4GB (okay, with a practical size < 2GB as you note), but this is per-process on the machine. Real address space is not mapped anywhere in the system (yes, the PFN table is, which tracks real memory, but each page in Win32 is 4096(?) bytes), and the running system is therefore not limited to 4GB of real memory. The system only needs to map 4GB/4096 entries for each page in the system executive's address space, and as Russ's article points out, this can be done in virtual memory (I would imagine with admittedly degraded performance), so the poor performance version of this could map PFNs in virtual space up to (say) 2GB without too much trouble (that's 2GB of PFNs, not 2GB of virtual memory).
This may be a bit of a reach for Win32, but if the page size were increased, even larger memory sizes (real memory) could be supported; however the 4GB virtual size remains.
Also note that his article says that some variation of this seems to be done with Windows Server 2008 Datacenter:
the 32-bit version of Windows Server 2008 Standard supports only 4GB, while the 32-bit Windows Server 2008 Datacenter supports 64GB.
[I am assuming here from memory that a page is 4096 bytes. If this detail is wrong, then some of my results are wrong but the principles should stand with recalculation using corrected page size. I saw something that said Itanium used 8192.]
Look. You came in to this with a question of "how can I get more meory out of my 32-bit Windows". We've all told you that you can't. The way you presented your question and the follow-ups you posted all suggested you didn't have much of an idea about how Windows uses and manages memory, so we all simplified the discussion and concepts to match. You turned it into this "Why did Microsoft do this?" discussion, no us.
It's easy to understand, really. It comes down to money. If you want access to more memory, buy the more expensive version of Windows. That's why the support you want isn't there. This alone makes the rest of your discussion a moot point.
Okay, I spent some time on this, and am making a separate response instead of editing my previous response. I read Mark's article[^] you suggested, and just spent an hour+ watching the webcast[^]. Mark's article was good and had some relevant points to what we are considering here, and in fact confirmed what I said and (surprise to me) showed that Microsoft is already doing this for multiple operating systems - but not for workstation or non-server builds.
The webcast was interesting for orthogonal reasons but really had no relevance to the problem at hand.
The suggestion that I made was that Microsoft 32 bit operating systems could support memory sizes larger than 4GB even though a particular process can not address more than 4GB (actually either 2GB or 3GB for reasons we don't need to beat to death here). This is because there is considerable difference in capacity between real memory and virtual memory on a system (and all Microsoft OSs have virtual memory). To put it a different way, any given process on the system is not capable of addressing more than 4GB of memory, but there is more than one process on the system.
The article that you referred me to in fact verified what I suggest here and said that Microsoft has been doing this already in several server products. Read the section titled "Windows Server Memory Limits". It talks about both 32 and 64 bit addressing, and describes how MS has done what I described on 32 bit machines...
I can respond to your other points but it would be a bit repetitive.
Dave Kreskowiak wrote:
You really need to read up on how Windows manages memory.
Ummm yeah. Right back at you.
P.S. PAE that you cite has nothing to do with this and is of no consideration here. I am talking about plain 32 bit addressing modes and not PAE.
From Wiki; [^]The range of integer values that can be stored in 32 bits is 0 through 4,294,967,295. Hence, a processor with 32-bit memory addresses can directly access 4 GiB of byte-addressable memory.
Physical Address Extension (PAE) is a feature to allow 32-bit x86 processors to access a physical address space (including random access memory and memory mapped devices) larger than 4 gigabytes. For PAE to be available, the motherboard must also support it.
Ya I looked into it when I got my driving glasses. before I had it done, I had coke bottles for glasses and couldn't see 2". Now I can see a wart on a fly's ass 5 miles away. But over time your eyes degrade, so I think it's time for a new treatment.
Or maybe I should just lay off the vodka while I'm coding...
But over time your eyes degrade, so I think it's time for a new treatment.
I think you will find that the lenses of your eyes are hardening with age. Your distance vision is unaffected but your closer reading is becoming difficult. You will need reading glasses, further eye surgery will offer no benefits.
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible." - Mr.Prakash One Fine Saturday. 24/04/2004
I didn't realize it could be done more than once. I think I'd rather have the lens implants[^].
Yes, Lasik can be done more than once. I think there are some older versions that can't, so do some research.
As for the intraocular lenses.. wait until you actually need them done. Loosing all ability of your eyes to change focal distance sucks. Big time sucks. And your eyes still degrade fine focus afterwards anyway.
We can program with only 1's, but if all you've got are zeros, you've got nothing.
I've found two coffee and not starting before 9:30 helps
Seriously, at the age of 45-50 your eyes lose the ability to adapt to different distances, and no amount of Lasik can change that. Unfortunately implanted lenses don't have that ability either. The best you can hope for is good sight at long distance, with only the need for some cheap standard reading glasses for short distance.
Having said that, reading glasses that give you perfect sight at reading distance are still not optimal for reading computer screens. Therefore make sure you get some specifically optimized for computer screen distance. Just try out glasses of different strengths at your local optician. Maybe he has a computer that you can use to test them at your normal working distance, that would be ideal. If not, maybe you can a bring a Laptop or similar of your own.
I can't do computer work either when wearing bifocals. The top part of the screen is blurred. Then, I have to look down at my screen with face up. Then, people walking by will think that I am stuck up or being snobbish.
Multiple monitors rule.
Get a humongous monitor for coding, at least 24", and use it in portrait mode.
Then another 2 in landscape mode, one for docs/specs, the other for email and the other distractions you can't get rid of.
Age isn't the problem, the lack of screen real estate is....
Prescription computer glasses are the answer.
Reading glasses are designed for 18-24" where you hold a book.
Computer glasses are customized to your monitor distance (mine is 32").
Luckily there are several optometrists around Austin that know the difference
(some don't ...I learned the hard way).
I use 80%.
Productivity is directly proportional to the number of windows viewable at one time.
Sit in front of your monitor and run a tape measure from your face to the screen. Go to the optometrist as say you want spectacles for that distance. They will do it, no problem. If you don't say, they assume a normal book-reading distance.
Reading glasses should bring things back into focus. If they don't, go see an eye doctor and have your eyes checked. It could be something as simple as non-perscription ones won't do the job, or it could be something more serious (for me, it turned out to be early onset cataracts, but there's other more serious possibilities).
We can program with only 1's, but if all you've got are zeros, you've got nothing.
I've been fortunate in that my eyesight has stayed true despite my years staring at a computer screen. I'm a screen real estate junky. 15" laptops with 1920x1200 resolution is how I've rolled for years.. What I have found challenging as of late, is my light sensitivity is becoming a factor. I've always had mild sensitivity to light in outdoor environments. In the winter snowy months, they simply don't make sunglasses dark enough. During most any outdoor activity rain or shine, I've got a hat and sunglasses going dawn to dusk. I've noticed that the same eye fatigue and headaches have started to happen more often in front of my twin 22" screens. I fear if it continues I may have to consider getting some sort of slightly tinted glasses.
I've tried altering the monitor settings, and continually am adjusting my workspace to see if it's environmental. Ironically, I rarely have any issues sitting in front of my pc in a low light room and brightness on the screens on low. I just don't think my colleagues would go for killing the lights in the office.
ctrl-+ and ctrl-- (that's control minus) are your friends. On some keyboards it's ctrl-shift-+. Use it in browsers. Use it in the code editor window of visual studio (but not the other windows). Use it in mail programs.
Most of the programs that understand ctrl-+ also understand ctrl + mouse scrollwheel. Try ctrl scrollwheel on the windows desktop. Coooool.
LiquidVision is an inexpensive XP-era app that fiddled a bunch of windows metrics to make your teensy-tiny laptop screen readable. Don't know whether LiquidVision survived the transition to Vista or not.
Shift-alt-printscreen puts your screen into an inverse-video high-contrast mode that I find easier to read. Setting high contrast inverse colors really shows you who follows the rules of good windows programming, and who assumes the background will be white and the text will be windows-foreground color, resulting in black-on-black text.
You can set your dpi to 125% or 150%, effectively magnifying all text. There's also a more advanced screen to set dpi by increments. Setting a custom dpi is another way to find out who follows the rules, and who assumes a fixed dpi.
Bigger monitors (24", 27") are awesome steps on the road to old age. Buy a good one. Big cheap monitors suck.
I'm 70. I use a theme (I think it is 2008-DesertNights.vssettings) in Visual Studio which has light (near white) text on a dark (near black) background. I modified the font to a larger font - 14pt Bitstream Vera Sans Mono - and this is much easier to read and less tiring than the default small font and black on white.
Incidentally I use multi-focal specs for everything (I'm shortsighted) and don't have too much of a problem. Sure you do have to adapt to viewing things through the appropriate part of the lens for the distance but this only takes a few days with a new pair of spectacles. A recent visit to the eye surgeon showed that my eyesight has not changed in 3 years. Oh - and my left eye only has about 70% of the vision of the right one due to some retinal laser repair of burst blood vessels.
You wait until you get really old( 63 coming soon -- retirement yeahahahaha)
I seriously thought of a specific pair of reading glasses set up for screen distance rather than book distance. I use a 24 in screen but its still about what resolution you choose. Maybe my none HD laptop is the asnswer but you lose screen "Real Estate"
Variafocals don't do badly but its all the head movements to keep the focus "sweet spot"