background preloader

Smunix.os

Facebook Twitter

Bran's Kernel Development Tutorial on Bona Fide OS Developer. 4.-The GDT and IDT. The GDT and the IDT are descriptor tables.

4.-The GDT and IDT

They are arrays of flags and bit values describing the operation of either the segmentation system (in the case of the GDT), or the interrupt vector table (IDT). They are, unfortunately, a little theory-heavy, but bear with it because it'll be over soon! 4.1. The Global Descriptor Table (theory) The x86 architecture has two methods of memory protection and of providing virtual memory - segmentation and paging. With segmentation, every memory access is evaluated with respect to a segment. With paging, the address space is split into (usually 4KB, but this can change) blocks, called pages. Both of these methods have their advantages, but paging is much better. Segmentation is, however, totally in-built into the x86 architecture. As mentioned before, we're going to try and set up a flat memory model. A ring is a privilege level - zero being the most privileged, and three being the least. 4.2. Access byte format 4.2.1. descriptor_tables.h.

Builder

Object moved. Every time the CPU accesses virtual memory, a virtual address must be translated to the corresponding physical address.

Object moved

Conceptually, this translation requires a page-table walk, and with a three-level page table, three memory accesses would be required. In other words, every virtual access would result in four physical memory accesses. Clearly, if a virtual memory access were four times slower than a physical access, virtual memory would not be very popular! Fortunately, a clever trick removes most of this performance penalty: modern CPUs use a small associative memory to cache the PTEs of recently accessed virtual pages.

This memory is called the translation lookaside buffer (TLB). The TLB works as follows. But what happens if there is no TLB entry with a matching virtual page number? Hardware TLB miss handling: In this case, the CPU goes ahead and walks the page table to find the right PTE. TLB replacement policy Removing old entries from the TLB 4.4.1 The IA-64 TLB architecture.

Wikipedia

News - Kiwi. C++ Extensions. FrontPage - SCons Wiki. Welcome to the home of the SCons wiki (hosted by Pair Networks)!

FrontPage - SCons Wiki

This wiki is an open forum for development and use of SCons. Please, do feel free to contribute. New wiki users can practice in the WikiSandBox. Note: Due to wiki spamming, you must have an account to edit pages and be a member of WikiEditorsGroup to edit this page. Also due to spam, wiki changes are queued up and approved by moderators. SCons extensions/contributions HowToContribute - ideas for helping out the project in general (no hacking skills required!) Use bug macro by GregNoel to link to SCons bugs at scons.tigris.org directly from wiki pages. WikiUpgrade, lists bugs and feature requests for this wiki WikiUserPages, a page to find out about the people who edit this wiki (add yourself there!)