際際滷

際際滷Share a Scribd company logo
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.
Linux training in Chandigarh
(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
Ad

Recommended

Cdi implementation
Cdi implementation
Mohamed Salah
Memory management
Memory management
Fatin Nabilah
Memory segmentations
Memory segmentations
maamir farooq
8086 Microprocessor(Visit Munnuz Co Cc)
8086 Microprocessor(Visit Munnuz Co Cc)
muneer.k
Micka Manual
Micka Manual
SDIEDU
Computing glossary
Computing glossary
J谷k S辰n巽hez
Website Content Analysis Using Clickstream Data and Apriori Algorithm
Website Content Analysis Using Clickstream Data and Apriori Algorithm
TELKOMNIKA JOURNAL
Main Memory Management in Operating System
Main Memory Management in Operating System
Rashmi Bhat
Csc4320 chapter 8 2
Csc4320 chapter 8 2
bshikhar13
Chapter 8 - Main Memory
Chapter 8 - Main Memory
Wayne Jones Jnr
Memory+management
Memory+management
Kushagra Gaur
Linux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKB
shimosawa
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Anurag Deb
Optimization of 64-bit programs
Optimization of 64-bit programs
PVS-Studio
Top 35-interview-questions-on-sap-abap
Top 35-interview-questions-on-sap-abap
prathamesh4865
OSCh9
OSCh9
Joe Christensen
Ch9 OS
Ch9 OS
C.U
OS_Ch9
OS_Ch9
Supriya Shrivastava
Main memory os - prashant odhavani- 160920107003
Main memory os - prashant odhavani- 160920107003
Prashant odhavani
Mips 64
Mips 64
nayakslideshare
Ch8
Ch8
tech2click
Chapter2.3 4-mikroprocessor
Chapter2.3 4-mikroprocessor
teknik komputer ui
Page Cache in Linux 2.6.pdf
Page Cache in Linux 2.6.pdf
ycelgemici1
Microprocessor Unit-1( Introduction to 80386 Microprocessors)Second Year ppt
Microprocessor Unit-1( Introduction to 80386 Microprocessors)Second Year ppt
Shikha712235
Memory Managment(OS).pptx
Memory Managment(OS).pptx
RohitPaul71
Ppt
Ppt
Tejal Kasture
Paging & segmentation; advantages and disadvantage
Paging & segmentation; advantages and disadvantage
sohinibanerjee121
80386 Basic Programming Model and Application
80386 Basic Programming Model and Application
GilbeysJhonLadion2
Linux training in Chandigarh
Linux training in Chandigarh
ashish34a
Personality development course in Chandigarh
Personality development course in Chandigarh
ashish34a

More Related Content

Similar to Linux training in Chandigarh (20)

Csc4320 chapter 8 2
Csc4320 chapter 8 2
bshikhar13
Chapter 8 - Main Memory
Chapter 8 - Main Memory
Wayne Jones Jnr
Memory+management
Memory+management
Kushagra Gaur
Linux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKB
shimosawa
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Anurag Deb
Optimization of 64-bit programs
Optimization of 64-bit programs
PVS-Studio
Top 35-interview-questions-on-sap-abap
Top 35-interview-questions-on-sap-abap
prathamesh4865
OSCh9
OSCh9
Joe Christensen
Ch9 OS
Ch9 OS
C.U
OS_Ch9
OS_Ch9
Supriya Shrivastava
Main memory os - prashant odhavani- 160920107003
Main memory os - prashant odhavani- 160920107003
Prashant odhavani
Mips 64
Mips 64
nayakslideshare
Ch8
Ch8
tech2click
Chapter2.3 4-mikroprocessor
Chapter2.3 4-mikroprocessor
teknik komputer ui
Page Cache in Linux 2.6.pdf
Page Cache in Linux 2.6.pdf
ycelgemici1
Microprocessor Unit-1( Introduction to 80386 Microprocessors)Second Year ppt
Microprocessor Unit-1( Introduction to 80386 Microprocessors)Second Year ppt
Shikha712235
Memory Managment(OS).pptx
Memory Managment(OS).pptx
RohitPaul71
Ppt
Ppt
Tejal Kasture
Paging & segmentation; advantages and disadvantage
Paging & segmentation; advantages and disadvantage
sohinibanerjee121
80386 Basic Programming Model and Application
80386 Basic Programming Model and Application
GilbeysJhonLadion2
Csc4320 chapter 8 2
Csc4320 chapter 8 2
bshikhar13
Chapter 8 - Main Memory
Chapter 8 - Main Memory
Wayne Jones Jnr
Memory+management
Memory+management
Kushagra Gaur
Linux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKB
shimosawa
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Anurag Deb
Optimization of 64-bit programs
Optimization of 64-bit programs
PVS-Studio
Top 35-interview-questions-on-sap-abap
Top 35-interview-questions-on-sap-abap
prathamesh4865
Ch9 OS
Ch9 OS
C.U
Main memory os - prashant odhavani- 160920107003
Main memory os - prashant odhavani- 160920107003
Prashant odhavani
Chapter2.3 4-mikroprocessor
Chapter2.3 4-mikroprocessor
teknik komputer ui
Page Cache in Linux 2.6.pdf
Page Cache in Linux 2.6.pdf
ycelgemici1
Microprocessor Unit-1( Introduction to 80386 Microprocessors)Second Year ppt
Microprocessor Unit-1( Introduction to 80386 Microprocessors)Second Year ppt
Shikha712235
Memory Managment(OS).pptx
Memory Managment(OS).pptx
RohitPaul71
Paging & segmentation; advantages and disadvantage
Paging & segmentation; advantages and disadvantage
sohinibanerjee121
80386 Basic Programming Model and Application
80386 Basic Programming Model and Application
GilbeysJhonLadion2

More from ashish34a (16)

Linux training in Chandigarh
Linux training in Chandigarh
ashish34a
Personality development course in Chandigarh
Personality development course in Chandigarh
ashish34a
linux training in Chandigarh
linux training in Chandigarh
ashish34a
Accounting courses in Chandigarh
Accounting courses in Chandigarh
ashish34a
Computer courses in Chandigarh
Computer courses in Chandigarh
ashish34a
Tally training in Chandigarh
Tally training in Chandigarh
ashish34a
Tally training in Chandigarh
Tally training in Chandigarh
ashish34a
Accounting courses in Chandigarh
Accounting courses in Chandigarh
ashish34a
tally training in Chandigarh
tally training in Chandigarh
ashish34a
Computer courses in Chandigarh
Computer courses in Chandigarh
ashish34a
Accounting courses in Chandigarh
Accounting courses in Chandigarh
ashish34a
Tally training in Chandigarh
Tally training in Chandigarh
ashish34a
Tally training in chandigarh
Tally training in chandigarh
ashish34a
Accounting courses in chandigarh
Accounting courses in chandigarh
ashish34a
Computer courses in chandigarh
Computer courses in chandigarh
ashish34a
tally training in Chandigarh
tally training in Chandigarh
ashish34a
Linux training in Chandigarh
Linux training in Chandigarh
ashish34a
Personality development course in Chandigarh
Personality development course in Chandigarh
ashish34a
linux training in Chandigarh
linux training in Chandigarh
ashish34a
Accounting courses in Chandigarh
Accounting courses in Chandigarh
ashish34a
Computer courses in Chandigarh
Computer courses in Chandigarh
ashish34a
Tally training in Chandigarh
Tally training in Chandigarh
ashish34a
Tally training in Chandigarh
Tally training in Chandigarh
ashish34a
Accounting courses in Chandigarh
Accounting courses in Chandigarh
ashish34a
tally training in Chandigarh
tally training in Chandigarh
ashish34a
Computer courses in Chandigarh
Computer courses in Chandigarh
ashish34a
Accounting courses in Chandigarh
Accounting courses in Chandigarh
ashish34a
Tally training in Chandigarh
Tally training in Chandigarh
ashish34a
Tally training in chandigarh
Tally training in chandigarh
ashish34a
Accounting courses in chandigarh
Accounting courses in chandigarh
ashish34a
Computer courses in chandigarh
Computer courses in chandigarh
ashish34a
tally training in Chandigarh
tally training in Chandigarh
ashish34a
Ad

Recently uploaded (20)

List View Components in Odoo 18 - Odoo 際際滷s
List View Components in Odoo 18 - Odoo 際際滷s
Celine George
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
parmarjuli1412
Wage and Salary Computation.ppt.......,x
Wage and Salary Computation.ppt.......,x
JosalitoPalacio
LDMMIA Yoga S10 Free Workshop Grad Level
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
English 3 Quarter 1_LEwithLAS_Week 1.pdf
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
VCE Literature Section A Exam Response Guide
VCE Literature Section A Exam Response Guide
jpinnuck
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
IIT Kharagpur Quiz Club
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
Tanja Vujicic - PISA for Schools contact Info
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
Romanticism in Love and Sacrifice An Analysis of Oscar Wildes The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wildes The Nightingal...
KaryanaTantri21
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
June 2025 Progress Update With Board Call_In process.pptx
June 2025 Progress Update With Board Call_In process.pptx
International Society of Service Innovation Professionals
HistoPathology Ppt. Arshita Gupta for Diploma
HistoPathology Ppt. Arshita Gupta for Diploma
arshitagupta674
Aprendendo Arquitetura Framework Salesforce - Dia 02
Aprendendo Arquitetura Framework Salesforce - Dia 02
Mauricio Alexandre Silva
List View Components in Odoo 18 - Odoo 際際滷s
List View Components in Odoo 18 - Odoo 際際滷s
Celine George
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
parmarjuli1412
Wage and Salary Computation.ppt.......,x
Wage and Salary Computation.ppt.......,x
JosalitoPalacio
LDMMIA Yoga S10 Free Workshop Grad Level
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
English 3 Quarter 1_LEwithLAS_Week 1.pdf
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
VCE Literature Section A Exam Response Guide
VCE Literature Section A Exam Response Guide
jpinnuck
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
IIT Kharagpur Quiz Club
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
Tanja Vujicic - PISA for Schools contact Info
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
Romanticism in Love and Sacrifice An Analysis of Oscar Wildes The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wildes The Nightingal...
KaryanaTantri21
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
HistoPathology Ppt. Arshita Gupta for Diploma
HistoPathology Ppt. Arshita Gupta for Diploma
arshitagupta674
Aprendendo Arquitetura Framework Salesforce - Dia 02
Aprendendo Arquitetura Framework Salesforce - Dia 02
Mauricio Alexandre Silva
Ad

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.
  • 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