CS2422 Assembly Language & System Programming September 22, 2005.

Slides:



Advertisements
Similar presentations
Memory Management Unit
Advertisements

Computer Organization and Assembly Language
Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU
Computer Organization and Assembly Languages Yung-Yu Chuang
Intel MP.
OS Memory Addressing.
IA-32 Architecture Computer Organization &
IA-32 Processor Architecture
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
Vacuum tubes Transistor 1948 ICs 1960s Microprocessors 1970s.
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
Chapter 8.3: Memory Management
Memory Management (II)
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
Web siteWeb site ExamplesExamples 1 Mode of Operation Protected mode  4 GB  32-bit address  Windows, Linux Real-address mode  1 MB space  20-bit address.
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved.
IA-32 Architecture COE 205 Computer Organization and Assembly Language Dr. Aiman El-Maleh College of Computer Sciences and Engineering King Fahd University.
Assembly Language for Intel-Based Computers Chapter 2: IA-32 Processor Architecture Kip Irvine.
Assembly Language Basic Concepts IA-32 Processor Architecture.
Vacuum tubes Transistor 1948 –Smaller, Cheaper, Less heat dissipation, Made from Silicon (Sand) –Invented at Bell Labs –Shockley, Brittain, Bardeen ICs.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2012 Lecture 15: Protected mode intro.
80x86 Processor Architecture
Protected Mode. Protected Mode (1 of 2) 4 GB addressable RAM –( to FFFFFFFFh) Each program assigned a memory partition which is protected from.
Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers, Intel IA-32 Family Intel386 4 GB addressable RAM,
Assembly Language for x86 Processors 6 th Edition Chapter 2: x86 Processor Architecture (c) Pearson Education, All rights reserved. You may modify.
Assembly Language for Intel-Based Computers, 5th Edition
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved.
Assembly Language for x86 Processors 6th Edition
Chapter 2: IA-32 Processor Architecture. Chapter Overview General Concepts IA-32 Processor Architecture IA-32 Memory Management Components of an IA-32.
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved.
Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You may modify and copy this slide show for your personal.
Assembly Language Basic Concepts IA-32 Processor Architecture.
An Introduction to 8086 Microprocessor.
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
1/2002JNM1 With 20 bits, 1,048,576 different combinations are available. Each memory location is assigned a different combination. Each memory location.
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.
Fall 2012 Chapter 2: x86 Processor Architecture. Irvine, Kip R. Assembly Language for x86 Processors 6/e, Chapter Overview General Concepts IA-32.
CS 6560 Operating System Design Lecture 8: Memory Management.
Paging Example What is the data corresponding to the logical address below:
80386DX.
Assembly Language for x86 Processors 6 th Edition Chapter 2: x86 Processor Architecture (c) Pearson Education, All rights reserved. You may modify.
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.
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.
University of Sargodha, Lahore Campus Prepared by Ali Saeed.
Microprocessor and Assembly Language Addressing Models
OS Memory Addressing. Architecture CPU – Processing units – Caches – Interrupt controllers – MMU Memory Interconnect North bridge South bridge PCI, etc.
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
Computer Organization & Assembly Language University of Sargodha, Lahore Campus Prepared by Ali Saeed.
Assembly Language for x86 Processors 6th Edition
Chapter Overview General Concepts IA-32 Processor Architecture
Lecture on Real Mode Memory Addressing
Assembly Language for Intel-Based Computers, 5th Edition
University of Gujrat Department of Computer Science
Page Replacement Implementation Issues
Assembly Language for Intel-Based Computers, 4th Edition
Intel Microprocessor.
Operating Modes UQ: State and explain the operating modes of X86 family of processors. Show the mode transition diagram highlighting important features.(10.
MICROPROCESSOR MEMORY ORGANIZATION
Microprocessor and Assembly Language Addressing Models
Page Replacement Implementation Issues
Lecture 36 Syed Mansoor Sarwar
Assembly Language (CSW 353)
Lecture 37 Syed Mansoor Sarwar
Assembly Language for Intel-Based Computers, 5th Edition
AKT211 – CAO 05 – x86 Architecture: Intel 8088 (2)
Presentation transcript:

CS2422 Assembly Language & System Programming September 22, 2005

Today’s Topics History of x86 Processors IA-32 Memory

Study Guide Section 2.2: IA-32 Processor Section 2.3: IA-32 Memory Management

Modes of Operation Protected mode –native mode (Windows, Linux) Real-address mode –native MS-DOS System management mode –power management, system security, diagnostics Virtual-8086 mode hybrid of Protected each program has its own 8086 computer

Addressable Memory Protected mode –4 GB –32-bit address Real-address and Virtual-8086 modes –1 MB space –20-bit address

Early Intel Microprocessors Intel 8080 –64K addressable RAM –8-bit registers –CP/M operating system –S-100 BUS architecture –8-inch floppy disks! Intel 8086/8088 –IBM-PC Used 8088 –1 MB addressable RAM –16-bit registers –16-bit data bus (8-bit for 8088) –separate floating-point unit (8087)

The IBM-AT Intel –16 MB addressable RAM –Protected memory –several times faster than 8086 –introduced IDE bus architecture –80287 floating point unit

Intel IA-32 Family Intel386 –4 GB addressable RAM, 32-bit registers, paging (virtual memory) Intel486 –instruction pipelining Pentium –superscalar, 32-bit address bus, 64- bit internal data path

IA-32 Memory Management Real-address mode Calculating linear addresses Protected mode Multi-segment model Paging

Real-Address mode 1 MB RAM maximum addressable Application programs can access any area of memory Single tasking Supported by MS-DOS operating system

Ancient History -- Segment IBM PC XT (Intel 8088/8086) is a so-called 16-bit machine. Each register has 16 bits. 2^16 = = 64K But we want to use more memory (640K, 1M)…

Segmented Memory linear addresses one segment Segmented memory addressing: absolute (linear) address is a combination of a 16-bit segment value added to a 16-bit offset

Segment Segment : Offset Segment: one of CS, DS, SS, ES Real address = Segment * 16 + Offset Overlapping segments. For example: 0000:01F0 = 0001:01E0 = 0010:00F0

Calculating Linear Addresses Given a segment address, multiply it by 16 (add a hexadecimal zero), and add it to the offset Example: convert 08F1:0100 to a linear address Adjusted Segment value: 0 8 F 1 0 Add the offset: Linear address:

Your turn... What linear address corresponds to the segment/offset address 028F:0030? 028F = Always use hexadecimal notation for addresses.

Your turn... What segment addresses correspond to the linear address 28F30h? Many different segment-offset addresses can produce the linear address 28F30h. For example: 28F0:0030, 28F3:0000, 28B0:0430,...

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

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

Converting Logical to Linear Address The segment selector points to a segment descriptor, which contains the base address of a memory segment. The 32-bit offset from the logical address is added to the segment ’ s base address, generating a 32-bit linear address.

Indexing into a Descriptor Table Each segment descriptor indexes into the program's local descriptor table (LDT). Each table entry is mapped to a linear address:

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

For More Information See Section 11.3