flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Memory Management !

Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
i didn't find any thread about the memory management.

so i launch one, cause i need more precisions.
the choise is always vast when writing an OS from the beginning.
reading articles and TUTs in OSDEV.org doesn't help me to make the choise.

i think about a file system for ram.
with a ram occupation bitmap, a ram root, and the things i don't think about right now.

the MMU is to be for RM & PM.
a dual mode MMU, if it's possible, can help for memory management since the boot.

the boot is at 7C00h,
the video is at various addresses,
the real mode memory ( first megabyte ) is always present since a long time now, all 386 computers have the full low memory present.
the extented memory is more complex to manage as it can have many holes, and some external memory locations, as;
video agp memory,
network cards,
sound cards,

how to detect all peripherals, know the exact addresses they use, know what sort of peripheral it is.

then, periph are detected, we need to know where we can create a new file in the ram.
this fiel can be later;
executed, it's code
read/write, it's self modifying code or datas
saved on the hard drive and deleted from memory.

to show the memory usage:
need of a bit map, wich cluster resolution? 512 bytes as the standard hard drives, 64 kbytes as the RM segment limit, 4Kbytes, 2Mbytes or 4Mbytes as the pages, 1Kbyte, other?

how to identify the current memory user? no need? check the current GDT?
set a ram File System?

Image

as you can see, i'm lost in the possibilities.
thanks
Image
Post 07 Dec 2007, 05:06
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
No more problems with mazes (labyrinths)! Wink

If you want to reach a center of maze and come back, you may use:
  • Ariadne's rope/thread (as Theseus did in Minotaur's labyrinth Wink ),
  • law of right hand (your right hand should be still in contact with the wall and you should follow it).
Interesting site: http://www.labyrinthos.net/f_homepage.htm
Very Happy
Post 07 Dec 2007, 08:48
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
speaking about maze theory of OS construction...
isn't it better to use a bulldozer?
and pass through the walls.... Very Happy
Post 21 Dec 2007, 21:00
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
Sometimes there doesn't exist subtle solution of problem, but we must use brute force to make break-through.

In Gordium, the capital of ancient state Phrygia (now in western Turkey) was temple in which was placed very complicated knot. There was a legend which says, that the man, who untie this knot will be emperor of the whole world (in the limits known these days). Alexander the Great simply cut through it. The priests of this temple found this solution correct. Smile

However, I'm not sure that "Alexandrian solution" is applicable to the OS construction... Wink
Post 22 Dec 2007, 09:34
View user's profile Send private message Visit poster's website Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias
MHajduk wrote:
...However, I'm not sure that "Alexandrian solution" is applicable to the OS construction...
This is the very situation where shoorick's skill would be invaluable. We need a drawing of Alexander slicing the Intel cpu with a laser gun, and replacing it with a much simpler cpu design, reflecting the profound changes in hardware capabilities since that orignal knot was tied more than 30 years ago. Edfed's bulldozer may be a tad too cumbersome for such a chore....
Post 23 Dec 2007, 13:13
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
buldozzer analogy...

like a buldozzer, the code and method used to manage the code "trip in the maze" can be made with a simple, very simple, and incomplete code manager. ignoring the ┬ÁP security options and settings.

the memory manager is entirelly software based. the use of paging is disabled.

so all this paging, tss and other strange schemes are ignored.
ring1 to 3?, for what? no need!
restriction of memory for the applications?
only the size of the binary + some opened files, the application can ask for more memory...
if the application want to take control of the computer, it can...
so limitations are not permanent.

the system is to be modified/optimised onrun...
Post 24 Dec 2007, 20:28
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:  


< 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.