flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > OS Construction > Reserve memory for user task

Author
Thread Post new topic Reply to topic
Fulgurance



Joined: 27 Nov 2017
Posts: 28

Reserve memory for user task

Hello, i stud actually protected mode and user task system, but i don't found short and simple asm example do simply user task. Can you give me very simple example with user task ?

I don't understand how to do that and how reserve memory for task ...
Post 20 Mar 2018, 00:06
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 15643
Location: Thasus

Does your OS have a memory manager? If not then you will probably need one.

Although it does depend upon how you have constructed your OS. If you use protected mode with paging then a simple memory pool allocator would probably be fine for a simple OS. If you are in real or unreal mode then it would be trickier to manage the fragmentation with a linear address space.
Post 20 Mar 2018, 04:52
View user's profile Send private message Visit poster's website Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 28

Oh i think i begin to understand ! I think it's the use of GDT, to define memory segment size and privilege type ?

And what use the use of pagination system ? I don't understand very well? To manage gdt segment ?

Where is it possible to find best suggestion to make securised system ?
Post 20 Mar 2018, 11:59
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 15643
Location: Thasus

OSes like Linux and Windows don't manipulate the GDT for tasks. They only use paging. It is the most flexible. Often the GDT is simply set to span the entire address space for each selector.
Post 20 Mar 2018, 12:20
View user's profile Send private message Visit poster's website Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 28

I have difficulty to understand the use of paging, i don't understand... Crying or Very sad
Post 20 Mar 2018, 17:19
View user's profile Send private message Reply with quote
BAiC



Joined: 22 Mar 2011
Posts: 255
Location: California


Fulgurance wrote:
I have difficulty to understand the use of paging, i don't understand... Crying or Very sad



have you heard of American owned airliners dragging people out of planes? U.S. law allows airliners to overbook their planes. they sell to multiple people expecting some of them to not show up. this is also what paging is meant to do.

one example is when you cache a file you might not need all of it. also; as a general rule you won't need access to all of it at the same time. the OS stores parts of different files for multiple programs allowing them to effectively (or actually in a multiple core system) run in parallel.

_________________
byte me.
Post 20 Mar 2018, 17:42
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


Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2018, Tomasz Grysztar.
Powered by rwasa.