SlideShare a Scribd company logo
1 of 9
Linux training in
Chandigarh
Memory management is
mainly related to allocation of
main memory for requests of
processes. There are two
important features of the
Memory Management
Function: Security and
Sharing. Memory
management activity in the
Linux kernel There are some
key issues related to memory
management :
Architecture - independent memory model in Linux
Pages of Memory :
Physical memory is divided into pages. The size of the memory page is defined by the PAGE_SIZE
macro. For x86 processors, the size is set to 4 KB, while the Alpha processor uses 8 KB.
Virtual address space :
A process runs in the virtual address space. In the abstract memory model, virtual address space is
structured as kernel segment and user segment. The code and data for the kernel can be accessed in
kernel segments, and the code and data for the process in the user segment.
A virtual address is given in the context of the offset within the Segment selector and Segment.
When the code is being processed, the Segment selector has already been set and only the offset is
used. In the kernel, to pass the parameter, data in the kernel segment requires data not only in the
user segment. For this purpose, the put_user () and get_user () functions are defined.
The programmer simply refers to the memory address as the way to access the contents of the
memory unit. In the x86 Micro processor, we have three addresses.
(i) Logical Addresses :
Contained in machine language instructions that specify the address of an operand or instruction.
Each logical address has a segment and offset that represents the distance from the beginning of the
segment to the real address.
(ii) Linear Address :
A single 32-bit unsigned integer that can be used to process up to 4 GB of data and up to 232
locations.Linear addresses are usually shown in hexadecimal notation; Their values ​​are 0x00000000
to 0xffffffff.
(iii) Physical Address :
The physical address is used to address the memory cells included in the memory chip.
They match electrical signals that are sent to the subject bus with the address pin of the
microprocessor.The physical address is represented as a 32-bit unsigned integer.
Converting the Linear address :
Linux uses a three-level paging model, so paging on a 64-bit architecture is feasible. The x86 processor only supports
two-level conversion of linear addresses.Alpha processor supports three-level conversion because Alpha processor
supports linear addresses with a width of 64 bits
Three level paging model defines three types of paging table :
Page (Global) directory
Page middle directory
Page Table
Page Global Directory :
The page global directory includes the addresses of the intermediate directories of multiple pages. It is 12 bits long.
The different functions that can be used to modify the Page Global directory are:
(i) pgd_alloc () : Allocates a Page Directory and filles with 0.
(ii) pgd_bad() :It can be used to check if entry in the page directory is valid or not.
(iii) pgd_clear() : Delete the entry in page directory.
(iv) pgd_free() :Advertise the page of allocated memory in the page directory.
(v) pgd_none() : Tests whether the entry has been initialized.
Page Middle Directory :
This includes the address of several page tables. It's 13 bit length. Actions used to handle page middle directory:
(i) pmd_alloc() : Allocates a Page Middle directory to manage memory in
user area.
(ii) pmd_bad() :Test whether the entry in the page mid directory is valid.
(iii) pmd_clear() :The page removes entries in central entries is valid.
(iv) pmd_free() :A page central directory for memory in the user section releases. (v) pmd_offset (): The page
gives an entry address in the central directory
Which is the address allotted in the logic.
(vi) pmd_none() : Tests whether the entry in the page middle directory has been
set.
Page Table :
Each page table entry points to a page frame. It is 25 bits long. When modifying the contents of the memory
page, set the 'dirty' attribute. The page table entry contains a number of flags that describe the legal access
mode of the memory page and its status:
PAGE_NONE : No physical memory page is referenced by page table entry.
PAGE_SHARE : All types of Access are permitted.
PAGE_COPY : This macro is historical & identical toPAGE_READONLY.
PAGE_READONLY: Only read and execute access is allowed to this Page of
memory.
PAGE_KERNEL : Access to this page of memory is only allowed in the kernel
segment.
Following are some functions have been defined to manipulate the page table entries and their attributes :
(i) mk_pte() : pgprot_t type is a variable when Returned on a page table entry that is generated from the memory address
of a page
(ii) pte_alloc() : Allocates new page table.
(iii) pte_clear() : clears the page table entry.
(iv) pte_dirty() : it checks for ‘dirty’ attributes after it is set
(v) pte_free() : Releases the page table.
Call us @ 9988741983
Website: http://cbitss.in
Linux training in Chandigarh

More Related Content

Similar to Linux training in Chandigarh

Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Anurag Deb
 
Ch9 OS
Ch9 OSCh9 OS
Ch9 OS
C.U
 
Memory Managment(OS).pptx
Memory Managment(OS).pptxMemory Managment(OS).pptx
Memory Managment(OS).pptx
RohitPaul71
 

Similar to Linux training in Chandigarh (20)

Csc4320 chapter 8 2
Csc4320 chapter 8 2Csc4320 chapter 8 2
Csc4320 chapter 8 2
 
Chapter 8 - Main Memory
Chapter 8 - Main MemoryChapter 8 - Main Memory
Chapter 8 - Main Memory
 
Memory+management
Memory+managementMemory+management
Memory+management
 
Linux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKBLinux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKB
 
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
 
Optimization of 64-bit programs
Optimization of 64-bit programsOptimization of 64-bit programs
Optimization of 64-bit programs
 
Top 35-interview-questions-on-sap-abap
Top 35-interview-questions-on-sap-abapTop 35-interview-questions-on-sap-abap
Top 35-interview-questions-on-sap-abap
 
OS_Ch9
OS_Ch9OS_Ch9
OS_Ch9
 
OSCh9
OSCh9OSCh9
OSCh9
 
Ch9 OS
Ch9 OSCh9 OS
Ch9 OS
 
Main memory os - prashant odhavani- 160920107003
Main memory   os - prashant odhavani- 160920107003Main memory   os - prashant odhavani- 160920107003
Main memory os - prashant odhavani- 160920107003
 
Mips 64
Mips 64Mips 64
Mips 64
 
Ch8
Ch8Ch8
Ch8
 
Chapter2.3 4-mikroprocessor
Chapter2.3 4-mikroprocessorChapter2.3 4-mikroprocessor
Chapter2.3 4-mikroprocessor
 
Page Cache in Linux 2.6.pdf
Page Cache in Linux 2.6.pdfPage Cache in Linux 2.6.pdf
Page Cache in Linux 2.6.pdf
 
Memory Managment(OS).pptx
Memory Managment(OS).pptxMemory Managment(OS).pptx
Memory Managment(OS).pptx
 
Ppt
PptPpt
Ppt
 
Paging & segmentation; advantages and disadvantage
Paging & segmentation; advantages and disadvantagePaging & segmentation; advantages and disadvantage
Paging & segmentation; advantages and disadvantage
 
PAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 MicroporcessorPAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 Microporcessor
 
Cao 2012
Cao 2012Cao 2012
Cao 2012
 

More from ashish34a

More from ashish34a (16)

Linux training in Chandigarh
Linux training in ChandigarhLinux training in Chandigarh
Linux training in Chandigarh
 
Personality development course in Chandigarh
Personality development course in ChandigarhPersonality development course in Chandigarh
Personality development course in Chandigarh
 
linux training in Chandigarh
linux training in Chandigarhlinux training in Chandigarh
linux training in Chandigarh
 
Accounting courses in Chandigarh
Accounting courses in ChandigarhAccounting courses in Chandigarh
Accounting courses in Chandigarh
 
Computer courses in Chandigarh
Computer courses in ChandigarhComputer courses in Chandigarh
Computer courses in Chandigarh
 
Tally training in Chandigarh
Tally training in ChandigarhTally training in Chandigarh
Tally training in Chandigarh
 
Tally training in Chandigarh
Tally training in ChandigarhTally training in Chandigarh
Tally training in Chandigarh
 
Accounting courses in Chandigarh
Accounting courses in ChandigarhAccounting courses in Chandigarh
Accounting courses in Chandigarh
 
tally training in Chandigarh
tally training  in Chandigarhtally training  in Chandigarh
tally training in Chandigarh
 
Computer courses in Chandigarh
Computer courses in ChandigarhComputer courses in Chandigarh
Computer courses in Chandigarh
 
Accounting courses in Chandigarh
Accounting courses in ChandigarhAccounting courses in Chandigarh
Accounting courses in Chandigarh
 
Tally training in Chandigarh
Tally training in ChandigarhTally training in Chandigarh
Tally training in Chandigarh
 
Tally training in chandigarh
Tally training in chandigarhTally training in chandigarh
Tally training in chandigarh
 
Accounting courses in chandigarh
Accounting courses in chandigarhAccounting courses in chandigarh
Accounting courses in chandigarh
 
Computer courses in chandigarh
Computer courses in chandigarhComputer courses in chandigarh
Computer courses in chandigarh
 
tally training in Chandigarh
tally training in Chandigarhtally training in Chandigarh
tally training in Chandigarh
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
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
 

Recently uploaded (20)

SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
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
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
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
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
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...
 

Linux training in Chandigarh

  • 2. Memory management is mainly related to allocation of main memory for requests of processes. There are two important features of the Memory Management Function: Security and Sharing. Memory management activity in the Linux kernel There are some key issues related to memory management : Architecture - independent memory model in Linux
  • 3. Pages of Memory : Physical memory is divided into pages. The size of the memory page is defined by the PAGE_SIZE macro. For x86 processors, the size is set to 4 KB, while the Alpha processor uses 8 KB. Virtual address space : A process runs in the virtual address space. In the abstract memory model, virtual address space is structured as kernel segment and user segment. The code and data for the kernel can be accessed in kernel segments, and the code and data for the process in the user segment. A virtual address is given in the context of the offset within the Segment selector and Segment. When the code is being processed, the Segment selector has already been set and only the offset is used. In the kernel, to pass the parameter, data in the kernel segment requires data not only in the user segment. For this purpose, the put_user () and get_user () functions are defined. The programmer simply refers to the memory address as the way to access the contents of the memory unit. In the x86 Micro processor, we have three addresses.
  • 4.
  • 5. (i) Logical Addresses : Contained in machine language instructions that specify the address of an operand or instruction. Each logical address has a segment and offset that represents the distance from the beginning of the segment to the real address. (ii) Linear Address : A single 32-bit unsigned integer that can be used to process up to 4 GB of data and up to 232 locations.Linear addresses are usually shown in hexadecimal notation; Their values ​​are 0x00000000 to 0xffffffff. (iii) Physical Address : The physical address is used to address the memory cells included in the memory chip. They match electrical signals that are sent to the subject bus with the address pin of the microprocessor.The physical address is represented as a 32-bit unsigned integer.
  • 6. Converting the Linear address : Linux uses a three-level paging model, so paging on a 64-bit architecture is feasible. The x86 processor only supports two-level conversion of linear addresses.Alpha processor supports three-level conversion because Alpha processor supports linear addresses with a width of 64 bits Three level paging model defines three types of paging table : Page (Global) directory Page middle directory Page Table Page Global Directory : The page global directory includes the addresses of the intermediate directories of multiple pages. It is 12 bits long. The different functions that can be used to modify the Page Global directory are: (i) pgd_alloc () : Allocates a Page Directory and filles with 0. (ii) pgd_bad() :It can be used to check if entry in the page directory is valid or not. (iii) pgd_clear() : Delete the entry in page directory. (iv) pgd_free() :Advertise the page of allocated memory in the page directory. (v) pgd_none() : Tests whether the entry has been initialized. Page Middle Directory :
  • 7. This includes the address of several page tables. It's 13 bit length. Actions used to handle page middle directory: (i) pmd_alloc() : Allocates a Page Middle directory to manage memory in user area. (ii) pmd_bad() :Test whether the entry in the page mid directory is valid. (iii) pmd_clear() :The page removes entries in central entries is valid. (iv) pmd_free() :A page central directory for memory in the user section releases. (v) pmd_offset (): The page gives an entry address in the central directory Which is the address allotted in the logic. (vi) pmd_none() : Tests whether the entry in the page middle directory has been set. Page Table : Each page table entry points to a page frame. It is 25 bits long. When modifying the contents of the memory page, set the 'dirty' attribute. The page table entry contains a number of flags that describe the legal access mode of the memory page and its status: PAGE_NONE : No physical memory page is referenced by page table entry. PAGE_SHARE : All types of Access are permitted.
  • 8. PAGE_COPY : This macro is historical & identical toPAGE_READONLY. PAGE_READONLY: Only read and execute access is allowed to this Page of memory. PAGE_KERNEL : Access to this page of memory is only allowed in the kernel segment. Following are some functions have been defined to manipulate the page table entries and their attributes : (i) mk_pte() : pgprot_t type is a variable when Returned on a page table entry that is generated from the memory address of a page (ii) pte_alloc() : Allocates new page table. (iii) pte_clear() : clears the page table entry. (iv) pte_dirty() : it checks for ‘dirty’ attributes after it is set (v) pte_free() : Releases the page table. Call us @ 9988741983 Website: http://cbitss.in