flat assembler
Message board for the users of flat assembler.

Index > Main > Memory Operating System (FAMOS)

Goto page Previous  1, 2, 3, 4  Next
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17664
Location: In your JS exploiting you and your system
revolution
You can always disable the paging file, it's easy to do.

4K is because that is the CPU page size. There is a trade off between good granularity and not wasting unused RAM. If the 2M/4M page size was used there can be a lot of wasted unused space in each page when used by typical user programs.
Post 22 Jul 2008, 21:53
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
neville wrote:
Windows uses a page database called the PFN for memory allocation - a bit like a File Allocation Table, except its for 4K memory pages instead of disk sectors! It that's true, no wonder Windows is so slow!


lol.

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 22 Jul 2008, 23:01
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
bogdanontanu
Besides Solar OS is the first "memory operating system" and not this "FAMOS" Smile

lol
Post 23 Jul 2008, 01:28
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
neville, we are not trying to discourage you.
Post 23 Jul 2008, 05:22
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
bogdanontanu, is Solar OS really a MOS or a DOS? I'll download it soon ...

I've been reading Mark's Blog about how Windows "manages" memory (link that comrade gave) and its really interesting, but also a bit confusing sometimes. Mark says:

"The maximum 32-bit limit of 128GB, supported by Windows Server 2003 Datacenter Edition, comes from the fact that structures the Memory Manager uses to track physical memory would consume too much of the system's virtual address space on larger systems. The Memory Manager keeps track of each page of memory in an array called the PFN database and, for performance, it maps the entire PFN database into virtual memory."

Surely this doesn't make sense? Isn't virtual memory and physical memory round the wrong way?? Then I would understand it. Surely it's the structures to track virtual memory that would consume too much physical memory?? But why would you map a database into virtual memory "for performance" reasons?? That doesn't sound right either.

All of which illustrates why virtual memory or pagefiles etc should not be part of any modern operating system with GB of real physical RAM to use (or even 16MB of RAM which FAMOS can run on, but is better the more RAM there is, because it is a true pure Memory OS. There is no C: drive or any "default" drive in FAMOS...)

_________________
FAMOS - the first memory operating system
Post 23 Jul 2008, 08:30
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3043
Location: vpcmipstrm
bitRAKE
neville, have you attempted to test the cost of paging? The mapping of virtual addresses doesn't cost anything - processor does it on every address calculation. When the page is present there should be no cost for paging either.

_________________
¯\(°_o)/¯ unlicense.org
Post 23 Jul 2008, 08:31
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3043
Location: vpcmipstrm
bitRAKE
neville wrote:
But why would you map a database into virtual memory "for performance" reasons?? That doesn't sound right either.
Ever heard of memory mapped file?

I have an 64MB file, which I generate 32 bytes for each byte in the file - how can I process my file?

_________________
¯\(°_o)/¯ unlicense.org
Post 23 Jul 2008, 08:45
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17664
Location: In your JS exploiting you and your system
revolution
bitRAKE: I think you confused virtual memory (which is the HDD) with main memory.
Post 23 Jul 2008, 08:53
View user's profile Send private message Visit poster's website Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
bitRAKE wrote:
neville, have you attempted to test the cost of paging? The mapping of virtual addresses doesn't cost anything - processor does it on every address calculation. When the page is present there should be no cost for paging either.


Yes, maybe when the page is present, but not when it isn't... I just think paging should be unnecessary when RAM is now so plentiful, even for multimedia applications. Gosh, I now have 100 times more RAM than the storage capacity that my hard disk used to be!

I did a little experiment on my laptop with XP just now. I turned off paging and rebooted. Then I waited for the hard disk to power down in power saving mode. Then I clicked on the Start button, and nothing happened until the hard disk powered up again! Why?? Because some part of XP was still in a default "system" pagefile that can't be turned off?? XP is a DOS all right. Very Happy

_________________
FAMOS - the first memory operating system
Post 23 Jul 2008, 09:00
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17664
Location: In your JS exploiting you and your system
revolution
neville wrote:
I did a little experiment on my laptop with XP just now. I turned off paging and rebooted. Then I waited for the hard disk to power down in power saving mode. Then I clicked on the Start button, and nothing happened until the hard disk powered up again! Why?? Because some part of XP was still in a default "system" pagefile that can't be turned off??
There is no "system" pagefile. What is happening is that all the necessary DLLs and graphics code were not being stored in RAM. When you press the start button it loads the code/data from disk to draw the new window. This is not the same as a pagefile, which stores dynamic data from RAM onto the HDD.
Post 23 Jul 2008, 09:15
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3043
Location: vpcmipstrm
bitRAKE
revolution wrote:
bitRAKE: I think you confused virtual memory (which is the HDD) with main memory.
No I didn't. Idea Change the file size to 800MB if it makes the point clearer for you.

_________________
¯\(°_o)/¯ unlicense.org


Last edited by bitRAKE on 23 Jul 2008, 10:00; edited 1 time in total
Post 23 Jul 2008, 09:41
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3043
Location: vpcmipstrm
bitRAKE
neville wrote:
I just think paging should be unnecessary when RAM is now so plentiful, even for multimedia applications. Gosh, I now have 100 times more RAM than the storage capacity that my hard disk used to be!
What about power consumption? My laptop hard drive uses less than 1W (160GB) - whereas the memory is over 6W (1.5GB). I'd like to see paging less used, but it is necessary (Intel requires it for long mode and VMX). My first HD was 20 megs on a MFM controller.
Quote:
almost all programming can be viewed as an exercise in caching

_________________
¯\(°_o)/¯ unlicense.org
Post 23 Jul 2008, 09:52
View user's profile Send private message Visit poster's website Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
to revolution: OK, i was only guessing about the system pagefile. But it is a bit the same because not all of the OS is in memory all the time. I say it should be, for "performance reasons"! Getting OS components from the HDD is what slow cumbersome old DOS's do .... Wink

to bitrake: Yes, but the RAM is there, it doesn't consume less power if you choose not to use it! So why not use it as much as possible? In a true MOS like FAMOS disks can be powered down completely until a mass storage operation is needed which is relatively infrequent compared to pagefile accesses. I don't know why Intel should "require" paging. What effect does it have on the CPU? The CPU is accessing memory all the time, whether it is paging or not. Its what CPU's do - the fetch/decode/execute cycle, the only program they know, just to keep reading memory and executing the next instruction... How can paging help the CPU?

_________________
FAMOS - the first memory operating system
Post 23 Jul 2008, 11:05
View user's profile Send private message Visit poster's website Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
bitRAKE: I forgot to say my first HDD was 10MB, also MFM.
Post 23 Jul 2008, 11:07
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Yeah, windows uses the paging file a bit too much, imho it's memory usage is a bit too conservative (at least up to and including XP, I haven't really played with Vista) - and on pre-XP, you can't even disable the paging file (well, you can, but windows will auto-create an "emergency" paging file in that case).

But I definitely think that paging (the x86 mechanism, not the use of a pagefile- pretty different things, even though pagefile is implemented using paging) should be enabled, to have process isolation/protection...

I dunno what the cost of x86 paging is, if it can even be measured on the processors we have today. Yes, it does have some overhead (using additional memory for the paging structures, TLB hits/misses, etc.) - but does it have a real impact?

Oh, and memory mapped file access is "slow" compared to other file I/O Smile - sure, you're limited to disk I/O speed so it isn't slower in wall clock time, but watch CPU usage of mmf I/O compared to regular ReadFile. You need a pretty slow CPU to notice it, though Smile
Post 23 Jul 2008, 14:38
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
About the "overuse" of the pagefile by Windows, are you sure that it really swaps out memory pages prematurely rather than just copying seldom modified pages on disk to improve the number of non-dirty pages (and hence faster allocation of physical pages later)?
Post 23 Jul 2008, 15:07
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3043
Location: vpcmipstrm
bitRAKE
neville wrote:
to bitrake: Yes, but the RAM is there, it doesn't consume less power if you choose not to use it! So why not use it as much as possible?
I couldn't agree more.
Quote:
In a true MOS like FAMOS disks can be powered down completely until a mass storage operation is needed which is relatively infrequent compared to pagefile accesses.
This is completely relative to specific use!
Quote:
I don't know why Intel should "require" paging. What effect does it have on the CPU? The CPU is accessing memory all the time, whether it is paging or not. Its what CPU's do - the fetch/decode/execute cycle, the only program they know, just to keep reading memory and executing the next instruction... How can paging help the CPU?
It is so fundamental that it has been integrated into everything they do - along with virtual address translation. f0dder touched on the primary reason - process isolation/protection. It is so important that we now have OS isolation/protection through VMX on top of that (or below - depending on how you look at it)!

Sure, none of these abstractions have to be used, but the setup time and additional resources consumed by them are far out weighed by the benefits they provide (assuming the variety of current use scenarios). An OS designed for specific use will of course make better use of resources.

_________________
¯\(°_o)/¯ unlicense.org
Post 23 Jul 2008, 18:14
View user's profile Send private message Visit poster's website Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
bogdanontanu
Quote:

bogdanontanu, is Solar OS really a MOS or a DOS? I'll download it soon ...


Yes, Solar OS is really a "memory operating system"

You can play with "SOL" button, applications, drivers, activate network layers, etc and the HDD will never "blink" ... it will never get accessed. The HDD will only blink when you want it to read files in HDD explorer application.

And there is no RAM disk simulating a HDD.

As comrade said I am not trying to discourage you but rather make you understand that although there is some truth in your perception ...

My "lol" is because your ideas are naive and your criticism of Win/Unix/Linux is not so honest/knowledgeable and your hopes are kindly exaggerated.

Before bashing Windows Unix and other "Disk OS" like you name them you should understand more about them.

If they want to and/or found any kind of advantage in doing so it will take Windows or Unix/Linux a blink of an eye to convert them selfs to an "Memory OS" style if they ever needed to.

But there are big advantages of paging and the ways they do things. Of course there are advantages of keeping things in RAM also. You will have to correctly understand the advantages/disadvantages and be ready to pay the price of your choices.

But without a deep, detailed and correct understanding there is no value in "ideas" alone.
Post 23 Jul 2008, 18:46
View user's profile Send private message Visit poster's website Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
bogdanontanu:
Nobody likes having their ideas called "naive" or "not so honest" etc.
Especially when it is only an (unjustified) personal opinion Surprised

I am truly very sorry that you do not fully agree with my ideas, which you think have "no value" because they lack a "deep, detailed and correct understanding").
I am sorry because we seem to share a belief in simplicity and elegance of design - and keeping C++ out of OS kernels! I downloaded your OS and tried it. It is nice. Your GUI graphics are much better than mine. FAMOS still starts in VESA mode 101 (640x480, 256 colours) but I do have plans to upgrade it. I used to use VESA linear buffer mode too (mode 4101) but too many computers of people trying FAMOS didn't support it Sad
So I reluctantly switched to VESA paged mode because nearly all except very old video cards support it. Paged video access made my code 3 times more complicated, and it is noticeably slower especially on one computer which has 4Kb video RAM granularilty (most have 64Kb). There is a very ironic lesson here about paging memory....

I'm also sorry because we might be the only 2 people in the world who have designed and written a genuine memory operating system. I did manage to crash your OS, but the watchdog came to the rescue Very Happy

I repeat that virtual memory is an outdated idea which should be abandoned. May I suggest that with careful analysis the supposed advantages of memory paging are now more virtual than real ...
What to you think about Mark's Blog and my comments in an earlier post? I am only questioning the way DOS's use memory and I say there should be a fundamental change in the way some OS's do it. Is that "bashing" them? I don't think so, but they are big enough to take it anyway... What makes you think Windows could change in the "blink of an eye". I seriously doubt that.

I don't yet have a 64-bit CPU, but Intel's long mode will make my planned 64-bit version of FAMOS very difficult if not impossible Crying or Very sad It is very sad that Intel want to turn their Ferraris into Model T Fords. Maybe AMD will force them to do the right thing, as has happened before.

Now lets be constructive, not a bit personal, and debate the issues here....

_________________
FAMOS - the first memory operating system
Post 23 Jul 2008, 20:59
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
LocoDelAssembly wrote:
About the "overuse" of the pagefile by Windows, are you sure that it really swaps out memory pages prematurely rather than just copying seldom modified pages on disk to improve the number of non-dirty pages (and hence faster allocation of physical pages later)?
A bit silly to do that when there's several gigabytes of free physical ram available, imho Smile

neville: "intel's" long mode was actually designed by AMD, and then copied (well, licensed I suppose) by intel, so there isn't much hope that "AMD will force them to do the right thing" - and what's so wrong with long mode, anyway?

_________________
Image - carpe noctem
Post 23 Jul 2008, 22:45
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.