-1

I've read the part of "Modern Operating Systems" by Tanenbaum about segmentation and got left with some questions:

How does the operating system manage the free memory space? For example my program needs another segment, so the OS trys to allocate memory, but how does it know the free or not free segmented parts? Does it look up every GDT and LDT entry to create some sort of memory map?

Thanks for some clarification!

brot
  • 9
  • Ask only one question. Here is not like forums. https://unix.stackexchange.com/questions/ask – Romeo Ninov May 11 '22 at 15:31
  • Sorry, my bad. I will do it next time. – brot May 11 '22 at 15:35
  • Edit your question and leave only one there. And ask new with the other point – Romeo Ninov May 11 '22 at 15:36
  • Please edit your question, leaving just one question per post. Make multiple posts as needed. I see your comment about doing it next time, however, you will get a better response from the community by following community guidelines, this time. – E-man May 12 '22 at 05:36
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community May 12 '22 at 05:37
  • Done... Question removed – brot May 12 '22 at 19:37

1 Answers1

1

The short answer is: segmentation is no longer used much.

The medium length answer is: segments are limited, there are a small finite number. We now use paging. It has some similarities, but is less resource constrained, at the cost of being less powerful per page/segment.

I heard that Linux on x86 does use one segment, to isolate it self (the kernel).

  • 1
    Hope my answer gives enough guidance. I am trying not to give the long answer, because as others say it is in the book, on the net, in source code. However learners need some direction. – ctrl-alt-delor May 11 '22 at 16:20