SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
06/02/20 1
Paging
Subject : Processor Architecture & Interfacing
Class : SEIT
Prepared By,
Ms. K. D. Patil, AP
Department of IT, Sanjivani COE, Kopargaon.
06/02/20 2
Paging Introduction
● Memory Management is the challenge for multitasking. To combat this
difficulty. 80386 has a method for managing memory called as Paging.
● The use of paging feature is optional & it is not available with real mode
operation of 80386.
● Paging is required if you want to run multiple 8086 Tasks on single
80386.
● Paging is beneficial in a multi-user system, in an open architecture,
bus structured system.
● The paging MMU works beneath the segmentation MMU & it
augments rather than replaces segmentation mechanism.
● When paging is disabled, the 4 Gb physical address space is organized
into segments that can be of any size from 1 byte to 4 Gb.
06/02/20 3
Paging Introduction
● However, when paging is enabled
the paging unit arranges the 4 Gb
physical address space into
1048496 (1 M) pages that are
each 4096 bytes (4 Kb) long as
shown in the figure
● The fixed size blocks of paged
memory are disadvantageous as
4 K addresses are allocated even
though not all of them are used.
This creation of unused sections
of memory is called fragmentation,
which results in less efficient use
of memory.
06/02/20 4
Support Registers
● Various control registers used in paging are – CR0, CR2 & CR3.
● In CR0, the MSB (bit 31) i.e. PG is used to control the paging
operation. If the PG bit is set, it enables the paging operation
(paging MMU) otherwise paging is disabled.
● CR2 is a read only register. During the page translation
mechanism if the page fault occurs then 80386 saves the address
at which the page fault occurred into CR2 register. This
address is known as page fault linear address.
● CR3 (most significant 20 bits) is also known as page directory base
register (PDBR) & holds 20-bit page directory base address which
points to the start of page directory which is 4KB aligned.
06/02/20 5
PDE Descriptor
06/02/20 6
PDE Descriptor
● Page table address: The most significant 20 bits of PDE point to the base of a
page table. It is a physical address. The least significant 12 bits of this address
are all 0s.
● User: Bits 9, 10 & 11 are not used by 80386. Programmer can use them as
they wish. User may uses these bits for demand paging.
● Accessed: 80386 automatically sets the bit 5 (A) whenever this PDE is used
in address translation. It is never cleared unless you write code for it.
● User/Supervisor: Bit 2 is U/S protection bit. If this bit is set the memory
pages that this PDE covers are accessible from all privilege levels. If it is
cleared the pages are accessible only by PL 0, 1 & 2 (supervisor) code.
● Present: Bit 0 is P bit. If this bit is set the page table pointed by this PDE is
present in physical memory
06/02/20 7
PDE Descriptor
● Read/Write: Bit 1 is R/W protection bit. If U/S bit is clear this bit has
no effect. If U/S bit is set, this bit determines whether the pages
covered by this PDE are write protected or not.
If R/W = 1 write operation is allowed.
If R/W = 0 Read and code fetch is allowed.
● If P bit is clear, the page table is not present in physical memory & the
rest of this PDE is available for use by programmer. The format of not
present page descriptor is as shown in earlier figure.
06/02/20 8
PTE Descriptor
06/02/20 9
PTE Descriptor
● Page table is an array of 1024 descriptor but PTE brings you one step
closer to the real memory.
● Page frame address: The most significant 20 bits of PTE point to the
base of a page frame or simply page. It is a physical address. The least
significant 12 bits of this address are all 0s.
● User: Bits 9, 10 & 11 are not used by 80386. Programmer can use
them as he/she wish.
● Accessed: 80386 automatically sets the bit 5 (A) whenever this PTE is
used in address translation.
● User/Supervisor: Bit 2 is U/S protection bit. If this bit is set the memory
page that this PTE covers is accessible from all privilege levels. If it is
cleared the page is accessible only by PL 0, 1 & 2 (supervisor) code.
06/02/20 10
PTE Descriptor
● Read/Write: Bit 1 is R/W protection bit. If U/S bit is clear this bit has
no effect. If U/S bit is set, this bit determines whether the page
covered by this PTE is write protected or not. If R/W = 1 write
operation is allowed otherwise not.
● Present: Bit 0 is P bit. If this bit is set the page pointed by this PTE is
present in physical memory otherwise not.
● Dirty: Bit 6 is D bit. It is automatically set by 80386 whenever the
page frame which this PTE covers is written into. Processor never
clears this bit. By periodically Testing and clearing this bit, you can
find out what pages of memory are being written to most.
06/02/20 11
3 Major Capabilities of Paging
Hardware
● Address Translation
- Page Translation converts 32 bit linear address To 32 bit physical
address transparently to add one more indirection to suit your
particular needs.
● Page level Protection
- This feature can only be used to make access more restrictive. They
cannot loosen permissions already denied by the segmentation.
● Demand Paging ( Virtual Memory )
- Used for virtual memory management. Virtual means being in effect
but not in fact. Creates illusion of infinite memory by using primary
memory as cache between processor & secondary memory – Based
on principle of locality
06/02/20 12
Address Translation
● Address Translation
● The segmentation & paging mechanism convert 48 bit logical addresses into
32 bit physical addresses required by the hardware.
● The block diagram of address translation is shown in the next figure.
● At first, the segment translation is performed on the logical address. Then if
paging is disabled, the linear address produced is equal to the physical address.
● However, if the paging is enabled, the linear address goes through a second
translation process, known as page translation, to produce the physical address.
It is this physical address that will finally be driven onto the address bus to the
outside world.
● Paging implementation is at the top of segmentation.
06/02/20 13
06/02/20 14
Linear to Physical Address
Translation : Linear Address Format
● As shown in figure, the linear address
produced by the segment translation is not
used as physical address, as it undergoes a
second translation called the page
translation.
● It has 3 fields: 12 bit offset field, 10 bit
page field & 10 bit directory field.
● Directory field is used to select one of the
1024 PDEs from the page Directory.
● Page field is used to select one of the
1024 PTEs to which the PDE is pointing.
● Offset field selects one of the 4096 bytes
of the memory from the page frame to
which PTE is pointing.
06/02/20 15
06/02/20 16
Linear to Physical address
Translation
● The diagram, shows how a linear address is translated into its equivalent
physical address.
● The address in the page directory base register (PDBR) in CR3 locates the
page directory table in memory. This address is 32 bits long. The upper 20
bits are from the CR3 & the lower 12 bits are assumed to be 000 H at the
beginning of the directory & range to FFF H at its end.
● Therefore, the page directory is of size 4 K. It consists of 1024, addresses
each of size 32 bit. These addresses each point to a separate page table.
● The 10 bit directory field of the linear address is the offset from the start of
the page directory table & selects one of 1024 entries.
● This pointer (32 bit address) of the desired page table is cached into
translation look- aside buffer (TLB).
06/02/20 17
Linear to Physical address
Translation
● This value is used as the base address of a page table in memory.
● Each page table is also 4 Kb long & contain 1024, 32 bit addresses. These
addresses are called page frame addresses. Each page frame address points to
a 4 K frame of data storage locations in physical memory.
● The 10 bit page field, of the linear address selects one of the 1024, 32 bit page
table entries & is cached into TLB.
● This frame of memory locations is used for storage of data. The 12 bit offset
part of the linear address identifies the location of the operand in the active
page frame.
● The TLB is capable of maintaining 32 sets of table entries. So 128 Kb of
paged memory is always directly accessible. Operands in this part of memory
can be accessed without first reading new entries from the page table.
06/02/20 18
Page Level Protection
● The least significant 3 bits (i.e. P bit, U/S bit & R/W bit) of the PDE & PTE
are used in page level protection.
● P Bit
- If P bit of PDE is cleared & 80386 tries to use this PDE, it will generate a
page fault (exception 14). The paging function will be aborted, no memory
will be accessed, & control will be transferred to page fault handler.
- Thus, if P bit is not set, 80386 will never be able to access any of the 1024
PTEs of the page table to which this PDE points.
- When there are holes in the linear address space & user intentionally
wants to omit that portion of memory, it is recommended to clear the P bit.
- The use of P bit in PTE is very similar to that of P bit in PDE but on a
smaller scale.
06/02/20 19
Page Level Protection
● U/S Bit
- If U/S bit of PDE is cleared the 4 Mb physical space pointed by this
PDE is accessible only to programs running at the supervisor level.
- Thus, one can deny access of the physical space even if the
segmentation mechanism & segment level privilege protection allows
it.
- The use of U/S bit in PTE is very similar to that of U/S bit in PDE but
on a smaller scale. (4 kB memory space.)
- If U/S bits in PDE or PTE cause a privilege violation the processor
will generate a page fault (exception 14). The paging function will be
aborted, no memory will be accessed, & control will be transferred to
page fault handler..
06/02/20 20
Page Level Protection
● R/W Bit
- Bit 1 of PDE or PTE sets read/ write permission for a 4 MB block
or 4 KB page frame respectively.
- This bit has an effect only if U/S = 1 i.e. read write permission does
not apply to supervisor level programs.
- In a PDE, if U/S =1 & R/W =1 all privilege levels can freely read &
write into the physical space pointed by PDE. If R/W = 0, write
permission is not allowed to PL 3 code.
- If a program attempts to write in such area, it will generate a page
fault (exception 14). The paging function will be aborted, no memory
will be accessed, & control will be transferred to page fault handler.
06/02/20 21
References
● James Turley, “Advanced 80386 programming
Techniques”, Tata McGraw Hill Edition

Weitere ähnliche Inhalte

Was ist angesagt?

8086 pin diagram description
8086 pin diagram description8086 pin diagram description
8086 pin diagram descriptionAkhil Singal
 
Dma transfer
Dma transferDma transfer
Dma transfergmnithya
 
Pin Description Of Intel 80386 DX Microprocessor
Pin Description Of Intel 80386 DX MicroprocessorPin Description Of Intel 80386 DX Microprocessor
Pin Description Of Intel 80386 DX MicroprocessorRaunaq Sahni
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operationNikhil Pandit
 
Addressing modes of 80386
Addressing modes of 80386Addressing modes of 80386
Addressing modes of 80386PDFSHARE
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386yash sawarkar
 
8086-microprocessor
8086-microprocessor8086-microprocessor
8086-microprocessorjhcid
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor Mustapha Fatty
 
Programmers model of 8086
Programmers model of 8086Programmers model of 8086
Programmers model of 8086KunalPatel260
 
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptxLecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptxVikasMahor3
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-pptjemimajerome
 
Computer instructions
Computer instructionsComputer instructions
Computer instructionsAnuj Modi
 
Internal architecture-of-8086
Internal architecture-of-8086Internal architecture-of-8086
Internal architecture-of-8086Estiak Khan
 
Register of 80386
Register of 80386Register of 80386
Register of 80386aviban
 
8086 in minimum mode
8086 in minimum mode8086 in minimum mode
8086 in minimum modeSridari Iyer
 

Was ist angesagt? (20)

8086 pin diagram description
8086 pin diagram description8086 pin diagram description
8086 pin diagram description
 
Dma transfer
Dma transferDma transfer
Dma transfer
 
Pin Description Of Intel 80386 DX Microprocessor
Pin Description Of Intel 80386 DX MicroprocessorPin Description Of Intel 80386 DX Microprocessor
Pin Description Of Intel 80386 DX Microprocessor
 
8086
80868086
8086
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operation
 
Addressing modes of 80386
Addressing modes of 80386Addressing modes of 80386
Addressing modes of 80386
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386
 
Introduction to 80386
Introduction to 80386Introduction to 80386
Introduction to 80386
 
8086 Microprocessor
8086 Microprocessor8086 Microprocessor
8086 Microprocessor
 
8086-microprocessor
8086-microprocessor8086-microprocessor
8086-microprocessor
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
 
Programmers model of 8086
Programmers model of 8086Programmers model of 8086
Programmers model of 8086
 
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptxLecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-ppt
 
Computer instructions
Computer instructionsComputer instructions
Computer instructions
 
Internal architecture-of-8086
Internal architecture-of-8086Internal architecture-of-8086
Internal architecture-of-8086
 
Register of 80386
Register of 80386Register of 80386
Register of 80386
 
80386 Architecture
80386 Architecture80386 Architecture
80386 Architecture
 
8086 in minimum mode
8086 in minimum mode8086 in minimum mode
8086 in minimum mode
 
Register Organization of 80386
Register Organization of 80386Register Organization of 80386
Register Organization of 80386
 

Ähnlich wie PAI Unit 3 Paging in 80386 Microporcessor

Unix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsUnix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsDrishti Bhalla
 
Address translation-mechanism-of-80386 by aniket bhute
Address translation-mechanism-of-80386 by aniket bhuteAddress translation-mechanism-of-80386 by aniket bhute
Address translation-mechanism-of-80386 by aniket bhuteAniket Bhute
 
Cs14 406 80386-mod1
Cs14 406 80386-mod1Cs14 406 80386-mod1
Cs14 406 80386-mod1Akhila Rahul
 
Csc4320 chapter 8 2
Csc4320 chapter 8 2Csc4320 chapter 8 2
Csc4320 chapter 8 2bshikhar13
 
PAGING MECHANISM Pentium.ppt
PAGING MECHANISM Pentium.pptPAGING MECHANISM Pentium.ppt
PAGING MECHANISM Pentium.pptPramodBorole2
 
address-translation-mechanism-of-80386 (1).ppt
address-translation-mechanism-of-80386 (1).pptaddress-translation-mechanism-of-80386 (1).ppt
address-translation-mechanism-of-80386 (1).ppt1556AyeshaShaikh
 
Microprocessor Unit -1 SE computer-II.pptx
Microprocessor  Unit -1 SE computer-II.pptxMicroprocessor  Unit -1 SE computer-II.pptx
Microprocessor Unit -1 SE computer-II.pptxakshathsingh2003
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating SystemRaj Mohan
 
Paging and Segmentation
Paging and SegmentationPaging and Segmentation
Paging and SegmentationMadhur Gupta
 
Architecture of 80386(www.munnuz.co.cc)
Architecture of 80386(www.munnuz.co.cc)Architecture of 80386(www.munnuz.co.cc)
Architecture of 80386(www.munnuz.co.cc)muneer.k
 
Class 6 an 8 bit embedded platform -pic mircocontroller basics
Class 6 an 8 bit embedded platform -pic mircocontroller basicsClass 6 an 8 bit embedded platform -pic mircocontroller basics
Class 6 an 8 bit embedded platform -pic mircocontroller basicsSURYAPRAKASH S
 
3 organization of intel 8086
3 organization of intel 80863 organization of intel 8086
3 organization of intel 8086ELIMENG
 
Assembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptxAssembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptxVickyThakur61
 
Intel 8086 microprocessor
Intel 8086 microprocessorIntel 8086 microprocessor
Intel 8086 microprocessorRavi Yasas
 
Hardware implementation of page table
Hardware implementation of page table Hardware implementation of page table
Hardware implementation of page table Sukhraj Singh
 
32- bit Microprocessor-Indtel 80386.pptx
32- bit Microprocessor-Indtel 80386.pptx32- bit Microprocessor-Indtel 80386.pptx
32- bit Microprocessor-Indtel 80386.pptxYuvraj994432
 

Ähnlich wie PAI Unit 3 Paging in 80386 Microporcessor (20)

Unix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsUnix Memory Management - Operating Systems
Unix Memory Management - Operating Systems
 
Address translation-mechanism-of-80386 by aniket bhute
Address translation-mechanism-of-80386 by aniket bhuteAddress translation-mechanism-of-80386 by aniket bhute
Address translation-mechanism-of-80386 by aniket bhute
 
Cs14 406 80386-mod1
Cs14 406 80386-mod1Cs14 406 80386-mod1
Cs14 406 80386-mod1
 
Csc4320 chapter 8 2
Csc4320 chapter 8 2Csc4320 chapter 8 2
Csc4320 chapter 8 2
 
PAGING MECHANISM Pentium.ppt
PAGING MECHANISM Pentium.pptPAGING MECHANISM Pentium.ppt
PAGING MECHANISM Pentium.ppt
 
address-translation-mechanism-of-80386 (1).ppt
address-translation-mechanism-of-80386 (1).pptaddress-translation-mechanism-of-80386 (1).ppt
address-translation-mechanism-of-80386 (1).ppt
 
Microprocessor Unit -1 SE computer-II.pptx
Microprocessor  Unit -1 SE computer-II.pptxMicroprocessor  Unit -1 SE computer-II.pptx
Microprocessor Unit -1 SE computer-II.pptx
 
Presentataion
Presentataion Presentataion
Presentataion
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating System
 
Paging and Segmentation
Paging and SegmentationPaging and Segmentation
Paging and Segmentation
 
80386.pptx
80386.pptx80386.pptx
80386.pptx
 
Architecture of 80386(www.munnuz.co.cc)
Architecture of 80386(www.munnuz.co.cc)Architecture of 80386(www.munnuz.co.cc)
Architecture of 80386(www.munnuz.co.cc)
 
The 80386 80486
The 80386 80486The 80386 80486
The 80386 80486
 
Class 6 an 8 bit embedded platform -pic mircocontroller basics
Class 6 an 8 bit embedded platform -pic mircocontroller basicsClass 6 an 8 bit embedded platform -pic mircocontroller basics
Class 6 an 8 bit embedded platform -pic mircocontroller basics
 
3 organization of intel 8086
3 organization of intel 80863 organization of intel 8086
3 organization of intel 8086
 
Assembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptxAssembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptx
 
Intel 8086 microprocessor
Intel 8086 microprocessorIntel 8086 microprocessor
Intel 8086 microprocessor
 
Hardware implementation of page table
Hardware implementation of page table Hardware implementation of page table
Hardware implementation of page table
 
32- bit Microprocessor-Indtel 80386.pptx
32- bit Microprocessor-Indtel 80386.pptx32- bit Microprocessor-Indtel 80386.pptx
32- bit Microprocessor-Indtel 80386.pptx
 
Vm
VmVm
Vm
 

Mehr von KanchanPatil34

Unit 2_2 Binary Tree as ADT_General Tree.pdf
Unit 2_2 Binary Tree as ADT_General Tree.pdfUnit 2_2 Binary Tree as ADT_General Tree.pdf
Unit 2_2 Binary Tree as ADT_General Tree.pdfKanchanPatil34
 
Unit 2_3 Binary Tree Traversals.pdf
Unit 2_3 Binary Tree Traversals.pdfUnit 2_3 Binary Tree Traversals.pdf
Unit 2_3 Binary Tree Traversals.pdfKanchanPatil34
 
Unit 1_SLL and DLL.pdf
Unit 1_SLL and DLL.pdfUnit 1_SLL and DLL.pdf
Unit 1_SLL and DLL.pdfKanchanPatil34
 
Unit 1_Stack and Queue using Linked Organization.pdf
Unit 1_Stack and Queue using Linked Organization.pdfUnit 1_Stack and Queue using Linked Organization.pdf
Unit 1_Stack and Queue using Linked Organization.pdfKanchanPatil34
 
PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386KanchanPatil34
 
SE PAI Unit 2_Data Structures in 80386 segmentation
SE PAI Unit 2_Data Structures in 80386 segmentationSE PAI Unit 2_Data Structures in 80386 segmentation
SE PAI Unit 2_Data Structures in 80386 segmentationKanchanPatil34
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1KanchanPatil34
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2KanchanPatil34
 
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3KanchanPatil34
 
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2KanchanPatil34
 
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1KanchanPatil34
 
SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051KanchanPatil34
 
Unit 5_Interrupt programming in 8051 micro controller - part 2
Unit 5_Interrupt programming in 8051 micro controller - part 2Unit 5_Interrupt programming in 8051 micro controller - part 2
Unit 5_Interrupt programming in 8051 micro controller - part 2KanchanPatil34
 
Unit 5_interrupt programming_Part 1
Unit 5_interrupt programming_Part 1Unit 5_interrupt programming_Part 1
Unit 5_interrupt programming_Part 1KanchanPatil34
 
Unit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idtUnit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idtKanchanPatil34
 
Unit 2 se pai_registers in 80386
Unit 2 se pai_registers in 80386Unit 2 se pai_registers in 80386
Unit 2 se pai_registers in 80386KanchanPatil34
 
Unit i se pai_dos function calls
Unit i se pai_dos function callsUnit i se pai_dos function calls
Unit i se pai_dos function callsKanchanPatil34
 

Mehr von KanchanPatil34 (20)

Unit 2_2 Binary Tree as ADT_General Tree.pdf
Unit 2_2 Binary Tree as ADT_General Tree.pdfUnit 2_2 Binary Tree as ADT_General Tree.pdf
Unit 2_2 Binary Tree as ADT_General Tree.pdf
 
Unit 2_1 Tree.pdf
Unit 2_1 Tree.pdfUnit 2_1 Tree.pdf
Unit 2_1 Tree.pdf
 
Unit 2_3 Binary Tree Traversals.pdf
Unit 2_3 Binary Tree Traversals.pdfUnit 2_3 Binary Tree Traversals.pdf
Unit 2_3 Binary Tree Traversals.pdf
 
Unit 1_SLL and DLL.pdf
Unit 1_SLL and DLL.pdfUnit 1_SLL and DLL.pdf
Unit 1_SLL and DLL.pdf
 
Unit 1_Stack and Queue using Linked Organization.pdf
Unit 1_Stack and Queue using Linked Organization.pdfUnit 1_Stack and Queue using Linked Organization.pdf
Unit 1_Stack and Queue using Linked Organization.pdf
 
PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386
 
SE PAI Unit 2_Data Structures in 80386 segmentation
SE PAI Unit 2_Data Structures in 80386 segmentationSE PAI Unit 2_Data Structures in 80386 segmentation
SE PAI Unit 2_Data Structures in 80386 segmentation
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
 
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
 
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2
 
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1
 
SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051
 
Unit 5_Interrupt programming in 8051 micro controller - part 2
Unit 5_Interrupt programming in 8051 micro controller - part 2Unit 5_Interrupt programming in 8051 micro controller - part 2
Unit 5_Interrupt programming in 8051 micro controller - part 2
 
Unit 5_interrupt programming_Part 1
Unit 5_interrupt programming_Part 1Unit 5_interrupt programming_Part 1
Unit 5_interrupt programming_Part 1
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
 
Unit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idtUnit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idt
 
Unit 2 se pai_registers in 80386
Unit 2 se pai_registers in 80386Unit 2 se pai_registers in 80386
Unit 2 se pai_registers in 80386
 
Unit i se pai_dos function calls
Unit i se pai_dos function callsUnit i se pai_dos function calls
Unit i se pai_dos function calls
 
DELD Unit V cpld_fpga
DELD Unit V cpld_fpgaDELD Unit V cpld_fpga
DELD Unit V cpld_fpga
 

Kürzlich hochgeladen

Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 

Kürzlich hochgeladen (20)

Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 

PAI Unit 3 Paging in 80386 Microporcessor

  • 1. 06/02/20 1 Paging Subject : Processor Architecture & Interfacing Class : SEIT Prepared By, Ms. K. D. Patil, AP Department of IT, Sanjivani COE, Kopargaon.
  • 2. 06/02/20 2 Paging Introduction ● Memory Management is the challenge for multitasking. To combat this difficulty. 80386 has a method for managing memory called as Paging. ● The use of paging feature is optional & it is not available with real mode operation of 80386. ● Paging is required if you want to run multiple 8086 Tasks on single 80386. ● Paging is beneficial in a multi-user system, in an open architecture, bus structured system. ● The paging MMU works beneath the segmentation MMU & it augments rather than replaces segmentation mechanism. ● When paging is disabled, the 4 Gb physical address space is organized into segments that can be of any size from 1 byte to 4 Gb.
  • 3. 06/02/20 3 Paging Introduction ● However, when paging is enabled the paging unit arranges the 4 Gb physical address space into 1048496 (1 M) pages that are each 4096 bytes (4 Kb) long as shown in the figure ● The fixed size blocks of paged memory are disadvantageous as 4 K addresses are allocated even though not all of them are used. This creation of unused sections of memory is called fragmentation, which results in less efficient use of memory.
  • 4. 06/02/20 4 Support Registers ● Various control registers used in paging are – CR0, CR2 & CR3. ● In CR0, the MSB (bit 31) i.e. PG is used to control the paging operation. If the PG bit is set, it enables the paging operation (paging MMU) otherwise paging is disabled. ● CR2 is a read only register. During the page translation mechanism if the page fault occurs then 80386 saves the address at which the page fault occurred into CR2 register. This address is known as page fault linear address. ● CR3 (most significant 20 bits) is also known as page directory base register (PDBR) & holds 20-bit page directory base address which points to the start of page directory which is 4KB aligned.
  • 6. 06/02/20 6 PDE Descriptor ● Page table address: The most significant 20 bits of PDE point to the base of a page table. It is a physical address. The least significant 12 bits of this address are all 0s. ● User: Bits 9, 10 & 11 are not used by 80386. Programmer can use them as they wish. User may uses these bits for demand paging. ● Accessed: 80386 automatically sets the bit 5 (A) whenever this PDE is used in address translation. It is never cleared unless you write code for it. ● User/Supervisor: Bit 2 is U/S protection bit. If this bit is set the memory pages that this PDE covers are accessible from all privilege levels. If it is cleared the pages are accessible only by PL 0, 1 & 2 (supervisor) code. ● Present: Bit 0 is P bit. If this bit is set the page table pointed by this PDE is present in physical memory
  • 7. 06/02/20 7 PDE Descriptor ● Read/Write: Bit 1 is R/W protection bit. If U/S bit is clear this bit has no effect. If U/S bit is set, this bit determines whether the pages covered by this PDE are write protected or not. If R/W = 1 write operation is allowed. If R/W = 0 Read and code fetch is allowed. ● If P bit is clear, the page table is not present in physical memory & the rest of this PDE is available for use by programmer. The format of not present page descriptor is as shown in earlier figure.
  • 9. 06/02/20 9 PTE Descriptor ● Page table is an array of 1024 descriptor but PTE brings you one step closer to the real memory. ● Page frame address: The most significant 20 bits of PTE point to the base of a page frame or simply page. It is a physical address. The least significant 12 bits of this address are all 0s. ● User: Bits 9, 10 & 11 are not used by 80386. Programmer can use them as he/she wish. ● Accessed: 80386 automatically sets the bit 5 (A) whenever this PTE is used in address translation. ● User/Supervisor: Bit 2 is U/S protection bit. If this bit is set the memory page that this PTE covers is accessible from all privilege levels. If it is cleared the page is accessible only by PL 0, 1 & 2 (supervisor) code.
  • 10. 06/02/20 10 PTE Descriptor ● Read/Write: Bit 1 is R/W protection bit. If U/S bit is clear this bit has no effect. If U/S bit is set, this bit determines whether the page covered by this PTE is write protected or not. If R/W = 1 write operation is allowed otherwise not. ● Present: Bit 0 is P bit. If this bit is set the page pointed by this PTE is present in physical memory otherwise not. ● Dirty: Bit 6 is D bit. It is automatically set by 80386 whenever the page frame which this PTE covers is written into. Processor never clears this bit. By periodically Testing and clearing this bit, you can find out what pages of memory are being written to most.
  • 11. 06/02/20 11 3 Major Capabilities of Paging Hardware ● Address Translation - Page Translation converts 32 bit linear address To 32 bit physical address transparently to add one more indirection to suit your particular needs. ● Page level Protection - This feature can only be used to make access more restrictive. They cannot loosen permissions already denied by the segmentation. ● Demand Paging ( Virtual Memory ) - Used for virtual memory management. Virtual means being in effect but not in fact. Creates illusion of infinite memory by using primary memory as cache between processor & secondary memory – Based on principle of locality
  • 12. 06/02/20 12 Address Translation ● Address Translation ● The segmentation & paging mechanism convert 48 bit logical addresses into 32 bit physical addresses required by the hardware. ● The block diagram of address translation is shown in the next figure. ● At first, the segment translation is performed on the logical address. Then if paging is disabled, the linear address produced is equal to the physical address. ● However, if the paging is enabled, the linear address goes through a second translation process, known as page translation, to produce the physical address. It is this physical address that will finally be driven onto the address bus to the outside world. ● Paging implementation is at the top of segmentation.
  • 14. 06/02/20 14 Linear to Physical Address Translation : Linear Address Format ● As shown in figure, the linear address produced by the segment translation is not used as physical address, as it undergoes a second translation called the page translation. ● It has 3 fields: 12 bit offset field, 10 bit page field & 10 bit directory field. ● Directory field is used to select one of the 1024 PDEs from the page Directory. ● Page field is used to select one of the 1024 PTEs to which the PDE is pointing. ● Offset field selects one of the 4096 bytes of the memory from the page frame to which PTE is pointing.
  • 16. 06/02/20 16 Linear to Physical address Translation ● The diagram, shows how a linear address is translated into its equivalent physical address. ● The address in the page directory base register (PDBR) in CR3 locates the page directory table in memory. This address is 32 bits long. The upper 20 bits are from the CR3 & the lower 12 bits are assumed to be 000 H at the beginning of the directory & range to FFF H at its end. ● Therefore, the page directory is of size 4 K. It consists of 1024, addresses each of size 32 bit. These addresses each point to a separate page table. ● The 10 bit directory field of the linear address is the offset from the start of the page directory table & selects one of 1024 entries. ● This pointer (32 bit address) of the desired page table is cached into translation look- aside buffer (TLB).
  • 17. 06/02/20 17 Linear to Physical address Translation ● This value is used as the base address of a page table in memory. ● Each page table is also 4 Kb long & contain 1024, 32 bit addresses. These addresses are called page frame addresses. Each page frame address points to a 4 K frame of data storage locations in physical memory. ● The 10 bit page field, of the linear address selects one of the 1024, 32 bit page table entries & is cached into TLB. ● This frame of memory locations is used for storage of data. The 12 bit offset part of the linear address identifies the location of the operand in the active page frame. ● The TLB is capable of maintaining 32 sets of table entries. So 128 Kb of paged memory is always directly accessible. Operands in this part of memory can be accessed without first reading new entries from the page table.
  • 18. 06/02/20 18 Page Level Protection ● The least significant 3 bits (i.e. P bit, U/S bit & R/W bit) of the PDE & PTE are used in page level protection. ● P Bit - If P bit of PDE is cleared & 80386 tries to use this PDE, it will generate a page fault (exception 14). The paging function will be aborted, no memory will be accessed, & control will be transferred to page fault handler. - Thus, if P bit is not set, 80386 will never be able to access any of the 1024 PTEs of the page table to which this PDE points. - When there are holes in the linear address space & user intentionally wants to omit that portion of memory, it is recommended to clear the P bit. - The use of P bit in PTE is very similar to that of P bit in PDE but on a smaller scale.
  • 19. 06/02/20 19 Page Level Protection ● U/S Bit - If U/S bit of PDE is cleared the 4 Mb physical space pointed by this PDE is accessible only to programs running at the supervisor level. - Thus, one can deny access of the physical space even if the segmentation mechanism & segment level privilege protection allows it. - The use of U/S bit in PTE is very similar to that of U/S bit in PDE but on a smaller scale. (4 kB memory space.) - If U/S bits in PDE or PTE cause a privilege violation the processor will generate a page fault (exception 14). The paging function will be aborted, no memory will be accessed, & control will be transferred to page fault handler..
  • 20. 06/02/20 20 Page Level Protection ● R/W Bit - Bit 1 of PDE or PTE sets read/ write permission for a 4 MB block or 4 KB page frame respectively. - This bit has an effect only if U/S = 1 i.e. read write permission does not apply to supervisor level programs. - In a PDE, if U/S =1 & R/W =1 all privilege levels can freely read & write into the physical space pointed by PDE. If R/W = 0, write permission is not allowed to PL 3 code. - If a program attempts to write in such area, it will generate a page fault (exception 14). The paging function will be aborted, no memory will be accessed, & control will be transferred to page fault handler.
  • 21. 06/02/20 21 References ● James Turley, “Advanced 80386 programming Techniques”, Tata McGraw Hill Edition