Protected Mode. Protected Mode (1 of 2) 4 GB addressable RAM –(00000000 to FFFFFFFFh) Each program assigned a memory partition which is protected from.

Slides:



Advertisements
Similar presentations
Memory Management Unit
Advertisements

Memory Management: Overlays and Virtual Memory
Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU
Computer Organization and Assembly Languages Yung-Yu Chuang
16.317: Microprocessor System Design I
4/14/2017 Discussed Earlier segmentation - the process address space is divided into logical pieces called segments. The following are the example of types.
Intel MP.
CSC 221 Computer Organization and Assembly Language
OS Memory Addressing.
IA-32 Processor Architecture
11/13/01CS-550 Presentation - Overview of Microsoft disk operating system. 1 An Overview of Microsoft Disk Operating System.
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
Chapter 8.3: Memory Management
Memory Management (II)
Microprocessor Simulation
Assembly Language Basic Concepts IA-32 Processor Architecture.
CS2422 Assembly Language & System Programming September 22, 2005.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2012 Lecture 15: Protected mode intro.
Chapter 91 Translation Lookaside Buffer (described later with virtual memory) Frame.
Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers, Intel IA-32 Family Intel386 4 GB addressable RAM,
Virtual Memory  Early computers had a small and fixed amount to memory. All programs had to be able to fit in this memory. Overlays were used when the.
Assembly Language for x86 Processors 6 th Edition Chapter 2: x86 Processor Architecture (c) Pearson Education, All rights reserved. You may modify.
1/2002JNM Edit, Assemble, Link & Debug. 1/2002JNM Files Created.
Intel MP (32-bit microprocessor) Designed to overcome the limits of its predecessor while maintaining the software compatibility with the.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-7 Memory Management (1) Department of Computer Science and Software.
The Pentium Processor.
The Pentium Processor Chapter 3 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
The Pentium Processor Chapter 3 S. Dandamudi.
The Intel Microprocessors. Real Mode Memory Addressing Real mode, also called real address mode, is an operating mode of and later x86-compatible.
CIS250 OPERATING SYSTEMS Memory Management Since we share memory, we need to manage it Memory manager only sees the address A program counter value indicates.
Chapter 2 Instruction Addressing and Execution. Lesson plan Review some concepts in the first week First assembly program with EMU8086 Related concepts.
CSC 660: Advanced Operating SystemsSlide #1 CSC 660: Advanced OS Memory Addressing / Kernel Modules.
2003 Dominic Swayne1 Microsoft Disk Operating System and PC DOS CS-550-1: Operating Systems Fall 2003 Dominic Swayne.
80386DX.
1 i386 Memory Management Professor Ching-Chi Hsu 1998 年 4 月.
The Microprocessor and Its Architecture A Course in Microprocessor Electrical Engineering Department University of Indonesia.
EFLAG Register of The The only new flag bit is the AC alignment check, used to indicate that the microprocessor has accessed a word at an odd.
Memory Management: Overlays and Virtual Memory. Agenda Overview of Virtual Memory –Review material based on Computer Architecture and OS concepts Credits.
1 Microprocessors CSE Protected Mode Memory Addressing Remember using real mode addressing we were previously able to address 1M Byte of memory.
Page Replacement Implementation Issues Text: –Tanenbaum ch. 4.7.
Chapter 2 The Microprocessor Architecture Microprocessors prepared by Dr. Mohamed A. Shohla.
University of Sargodha, Lahore Campus Prepared by Ali Saeed.
Microprocessor and Assembly Language Addressing Models
Information Security - 2. Descriptor Tables Descriptors are stored in three tables: – Global descriptor table (GDT) Maintains a list of most segments.
OS Memory Addressing. Architecture CPU – Processing units – Caches – Interrupt controllers – MMU Memory Interconnect North bridge South bridge PCI, etc.
Computer Organization & Assembly Language University of Sargodha, Lahore Campus Prepared by Ali Saeed.
Chapter 2 Instruction Addressing and Execution. Lesson plan Review some concepts in the first week First assembly program with EMU8086 Related concepts.
Chapter Overview General Concepts IA-32 Processor Architecture
CS 140 Lecture Notes: Virtual Memory
Lecture on Real Mode Memory Addressing
Descriptor Table & Register
16.317: Microprocessor System Design I
Assembly Language programming
Microprocessor Systems Design I
Memory Management © 2004, D. J. Foreman.
Computer Organization & Assembly Language Chapter 3
Memory Management References text: Tanenbaum ch.4.
Page Replacement Implementation Issues
CS 140 Lecture Notes: Virtual Memory
Intel Microprocessor.
Memory Management References text: Tanenbaum ch.4.
CS399 New Beginnings Jonathan Walpole.
Microprocessor and Assembly Language Addressing Models
Page Replacement Implementation Issues
CS 140 Lecture Notes: Virtual Memory
Lecture 36 Syed Mansoor Sarwar
Assembly Language (CSW 353)
Lecture 37 Syed Mansoor Sarwar
Assembly Language for Intel-Based Computers, 5th Edition
CS 140 Lecture Notes: Virtual Memory
Presentation transcript:

Protected Mode

Protected Mode (1 of 2) 4 GB addressable RAM –( to FFFFFFFFh) Each program assigned a memory partition which is protected from other programs Designed for multitasking Supported by Linux & MS-Windows

Protected Mode memory segmentation is defined by a set of tables (descriptor tables) and the segment registers contain pointers into these tables. Each table entry is 8- bytes wide. Global Descriptor Table (GDT), all applications can access Local Descriptor Table (LDT), specific to a task or program. Segment registers don't form part of the physical address in protected mode, but instead are used as pointers to table entries in the GDT or LDT

Protected mode (2 of 2) Segment descriptor tables Program structure –code, data, and stack areas –CS, DS, SS segment descriptors –global descriptor table (GDT) MASM Programs use the Microsoft flat memory model

Memory Management n Protected Mode (flat model)  Allows the microprocessor to address up to 4G byte of memory space  Selector, located in segment register, selects one of 8192 descriptors from one of two tables of descriptors

Memory Management n Protected Mode (flat model)  Descriptor, describes the location, length, and access rights of the segment of memory  Global descriptor table (GDT)  Local descriptor table (LDT)

Memory Management n Protected Mode (flat model)  Base address – indicates the starting location of the memory segment  24-bit for the – segments begin at any location in its 16M bytes of memory  32-bit for the and above - segments begin at any location in its 4G bytes of memory  Segment limit – contains the last offset address found in segment  Granularity bit (for and above)---- G=0, the limit specifies a segment limit of 00000H to FFFFFH; G=1, the value of limit is multiplied by 4K bytes (00000XXXH to FFFFFXXXH)

Memory Management n Protected Mode (flat model)  D bit – indicate how the instructions access register and memory data in protected mode  D=0, instructions are 16-bit instructions, with 16-bit offsets and 16-bit registers. Compatible with 8086 ~  D=1, 32-bit is assumed  AV bit – used by operating systems  AV=1, segment is available  AV=0, segment is not available

Memory Management n Protected Mode (flat model)  The Access Right

Which memory locations will be used as the data segment?

Flat Segment Model Single global descriptor table (GDT). All segments mapped to entire 32-bit address space

Multi-Segment Model Each program has a local descriptor table (LDT) –holds descriptor for each segment used by the program

Paging Supported directly by the CPU Divides each segment into 4096-byte blocks called pages Sum of all programs can be larger than physical memory Part of running program is in memory, part is on disk Virtual memory manager (VMM) – OS utility that manages the loading and unloading of pages Page fault – issued by CPU when a page must be loaded from disk

Assembling, Linking and Running Source file (.asm) Text editor Assembler Object file (.obj) Listing file (.lst) Linker Link library (.lib) Executable program (.exe) Map file (.map) Dos Loader Output ML

n Assembling Assembling, Linking and Running  Two staged process:  Assemble: Converts assembly language into machine language. Uses source file, outputs object file and optionally the list file  Link: Connects (links) the different.obj and library files together to create the executable file. Uses the object file(s) and optionally a library. Outputs executable file and optionally map file  Both done with ML command

MASM Installation  Insert CD in CD-Rom  Go to Desktop, select My Computer  Select CD-ROM directory  Double click “index.html”  On the new screen, follow the links, install MASM615  Install TextPad Editor and follow the link to install appropriate Tool Menu Command for 32-bit MASM Program (See the following link for details: dex.html#AddToolshttp:// dex.html#AddTools)

MASM Installation  “Run MASM Prog” Command n Corrections for the installation of Tool Commands in TextPad Should be $BaseName.exe