SlideShare a Scribd company logo
Subject  : Operating System Group Members :Muhammad Shakeeb  ( IS/17122-Aut -FO7 M )Syed Zeeshan Nasir       (  IS/17133-Aut –F 07 M )Faisal Muhammad            ( IS/17122-Aut –F07 M)Class : BsCS   4th  -B
           Handling Memory
• Process A's virtual address space• Physical memory• Process B's virtual address space
                 Memory ManagementThe initial memory management schemes were constrained in size by the relatively small memory resources of
 UNIX was developed  on the PDP machines
Pre 3BSD system use swapping exclusively to handle memory contention among processes
  If there is too much contention, processes are swapped out until enough memory is available
Allocation of both main memory and swap space is done first-fit                                 Paging Berkeley UNIX systems depend primarily on paging for memory-contention management, and depend only secondarily on swapping
 Demand paging – When a process needs a page and the page is not there, a page fault tot he kernel occurs, a frame of main memory is allocated, and the proper disk page is read into the frame
  A page daemon process uses a modified second-chance page-replacement algorithm to keep enough free frames to support the executing processes
  If the scheduler decides that the paging system is overloaded, processes will be swapped out whole until the overload is relieved                              PagingPage table entry
Disk block descriptors
Ad

Recommended

S3 l7 db2 storage model
S3 l7 db2 storage model
Mohammad Khan
 
S3 l4 db2 environment - databases
S3 l4 db2 environment - databases
Mohammad Khan
 
S3 l6 db2 - memory model
S3 l6 db2 - memory model
Mohammad Khan
 
Lecture storage-buffer
Lecture storage-buffer
Klaas Krona
 
Swap-space Management
Swap-space Management
Agnas Jasmine
 
Swap Administration in linux platform
Swap Administration in linux platform
ashutosh123gupta
 
S3 l5 db2 - process model
S3 l5 db2 - process model
Mohammad Khan
 
Swap space management and protection in os
Swap space management and protection in os
rajshreemuthiah
 
Os
Os
Agnas Jasmine
 
MySQL Space Management
MySQL Space Management
MIJIN AN
 
Ioppt
Ioppt
arun sharma
 
Incremental backups
Incremental backups
Vlad Lesin
 
Disk scheduling
Disk scheduling
J.T.A.JONES
 
Swapping | Computer Science
Swapping | Computer Science
Transweb Global Inc
 
Chapter13
Chapter13
gourab87
 
Ch 17 disk storage, basic files structure, and hashing
Ch 17 disk storage, basic files structure, and hashing
Zainab Almugbel
 
Disk structure
Disk structure
Shareb Ismaeel
 
Mass storage structure
Mass storage structure
pramila kanagaraj
 
Mass storage systemsos
Mass storage systemsos
Gokila Manickam
 
Learn about log structured file system
Learn about log structured file system
Gang He
 
Record storage and primary file organization
Record storage and primary file organization
Jafar Nesargi
 
Massstorage
Massstorage
mari sami
 
11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS
koolkampus
 
Thrashing allocation frames.43
Thrashing allocation frames.43
myrajendra
 
hpc2013_20131223
hpc2013_20131223
Ryohei Kobayashi
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organization
Jafar Nesargi
 
Mass Storage Structure
Mass Storage Structure
Vimalanathan D
 
OSCh11
OSCh11
Joe Christensen
 
Unit 5Memory management.pptx
Unit 5Memory management.pptx
SourabhRaj29
 
Chapter 8 - Main Memory
Chapter 8 - Main Memory
Wayne Jones Jnr
 

More Related Content

What's hot (20)

Os
Os
Agnas Jasmine
 
MySQL Space Management
MySQL Space Management
MIJIN AN
 
Ioppt
Ioppt
arun sharma
 
Incremental backups
Incremental backups
Vlad Lesin
 
Disk scheduling
Disk scheduling
J.T.A.JONES
 
Swapping | Computer Science
Swapping | Computer Science
Transweb Global Inc
 
Chapter13
Chapter13
gourab87
 
Ch 17 disk storage, basic files structure, and hashing
Ch 17 disk storage, basic files structure, and hashing
Zainab Almugbel
 
Disk structure
Disk structure
Shareb Ismaeel
 
Mass storage structure
Mass storage structure
pramila kanagaraj
 
Mass storage systemsos
Mass storage systemsos
Gokila Manickam
 
Learn about log structured file system
Learn about log structured file system
Gang He
 
Record storage and primary file organization
Record storage and primary file organization
Jafar Nesargi
 
Massstorage
Massstorage
mari sami
 
11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS
koolkampus
 
Thrashing allocation frames.43
Thrashing allocation frames.43
myrajendra
 
hpc2013_20131223
hpc2013_20131223
Ryohei Kobayashi
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organization
Jafar Nesargi
 
Mass Storage Structure
Mass Storage Structure
Vimalanathan D
 
OSCh11
OSCh11
Joe Christensen
 
MySQL Space Management
MySQL Space Management
MIJIN AN
 
Incremental backups
Incremental backups
Vlad Lesin
 
Ch 17 disk storage, basic files structure, and hashing
Ch 17 disk storage, basic files structure, and hashing
Zainab Almugbel
 
Learn about log structured file system
Learn about log structured file system
Gang He
 
Record storage and primary file organization
Record storage and primary file organization
Jafar Nesargi
 
11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS
koolkampus
 
Thrashing allocation frames.43
Thrashing allocation frames.43
myrajendra
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organization
Jafar Nesargi
 
Mass Storage Structure
Mass Storage Structure
Vimalanathan D
 

Similar to Unix (20)

Unit 5Memory management.pptx
Unit 5Memory management.pptx
SourabhRaj29
 
Chapter 8 - Main Memory
Chapter 8 - Main Memory
Wayne Jones Jnr
 
Mca ii os u-4 memory management
Mca ii os u-4 memory management
Rai University
 
Memory Managment(OS).pptx
Memory Managment(OS).pptx
RohitPaul71
 
memory management and Virtual Memory.ppt
memory management and Virtual Memory.ppt
ssuser09d6cd1
 
Cache replacement policies,cache miss,writingtechniques
Cache replacement policies,cache miss,writingtechniques
subhasishdas79
 
Memory+management
Memory+management
Kushagra Gaur
 
Main memory os - prashant odhavani- 160920107003
Main memory os - prashant odhavani- 160920107003
Prashant odhavani
 
OSCh9
OSCh9
Joe Christensen
 
Ch9 OS
Ch9 OS
C.U
 
OS_Ch9
OS_Ch9
Supriya Shrivastava
 
Memory management
Memory management
Mohammad Sadiq
 
Ch8
Ch8
tech2click
 
Memory management
Memory management
CHANDERPRABHU JAIN COLLEGE OF HIGHER STUDIES & SCHOOL OF LAW
 
CH09.pdf
CH09.pdf
ImranKhan880955
 
CH08.pdf
CH08.pdf
ImranKhan880955
 
How Data Instant Replay and Data Progression Work Together
How Data Instant Replay and Data Progression Work Together
Compellent Technologies
 
CS6401 OPERATING SYSTEMS Unit 3
CS6401 OPERATING SYSTEMS Unit 3
Kathirvel Ayyaswamy
 
Cs8493 unit 3
Cs8493 unit 3
Kathirvel Ayyaswamy
 
Cs8493 unit 3
Cs8493 unit 3
Kathirvel Ayyaswamy
 
Ad

More from Federal Urdu University (20)

Ntc internship report
Ntc internship report
Federal Urdu University
 
Network security at_osi_layers
Network security at_osi_layers
Federal Urdu University
 
Network Security Lec4
Network Security Lec4
Federal Urdu University
 
Network Security Lec5
Network Security Lec5
Federal Urdu University
 
Network Security
Network Security
Federal Urdu University
 
Os Linux Documentation
Os Linux Documentation
Federal Urdu University
 
Os Linux
Os Linux
Federal Urdu University
 
Maria Managment Spectrum
Maria Managment Spectrum
Federal Urdu University
 
Zohaib Dfd
Zohaib Dfd
Federal Urdu University
 
Zeeshan Estimation
Zeeshan Estimation
Federal Urdu University
 
Zahid Asd
Zahid Asd
Federal Urdu University
 
Umar Erd
Umar Erd
Federal Urdu University
 
Sohrab Waterfall Vs Rad
Sohrab Waterfall Vs Rad
Federal Urdu University
 
Sidra Agile Software Process
Sidra Agile Software Process
Federal Urdu University
 
Muzammil Prescriptive Vs Agile Process Models
Muzammil Prescriptive Vs Agile Process Models
Federal Urdu University
 
Muzammil Agile Vs Prescriptive
Muzammil Agile Vs Prescriptive
Federal Urdu University
 
Khurram Spiral
Khurram Spiral
Federal Urdu University
 
Hira Xp
Hira Xp
Federal Urdu University
 
G4 Group
G4 Group
Federal Urdu University
 
Faisal Incremental Model
Faisal Incremental Model
Federal Urdu University
 
Ad

Recently uploaded (20)

PyCon SG 25 - Firecracker Made Easy with Python.pdf
PyCon SG 25 - Firecracker Made Easy with Python.pdf
Muhammad Yuga Nugraha
 
Python Conference Singapore - 19 Jun 2025
Python Conference Singapore - 19 Jun 2025
ninefyi
 
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
 
10 Key Challenges for AI within the EU Data Protection Framework.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
Priyanka Aash
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
 
UserCon Belgium: Honey, VMware increased my bill
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
 
AI VIDEO MAGAZINE - June 2025 - r/aivideo
AI VIDEO MAGAZINE - June 2025 - r/aivideo
1pcity Studios, Inc
 
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
Fwdays
 
Curietech AI in action - Accelerate MuleSoft development
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 
PyCon SG 25 - Firecracker Made Easy with Python.pdf
PyCon SG 25 - Firecracker Made Easy with Python.pdf
Muhammad Yuga Nugraha
 
Python Conference Singapore - 19 Jun 2025
Python Conference Singapore - 19 Jun 2025
ninefyi
 
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
 
10 Key Challenges for AI within the EU Data Protection Framework.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
Priyanka Aash
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
 
UserCon Belgium: Honey, VMware increased my bill
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
 
AI VIDEO MAGAZINE - June 2025 - r/aivideo
AI VIDEO MAGAZINE - June 2025 - r/aivideo
1pcity Studios, Inc
 
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
Fwdays
 
Curietech AI in action - Accelerate MuleSoft development
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 

Unix

  • 1. Subject : Operating System Group Members :Muhammad Shakeeb ( IS/17122-Aut -FO7 M )Syed Zeeshan Nasir ( IS/17133-Aut –F 07 M )Faisal Muhammad ( IS/17122-Aut –F07 M)Class : BsCS 4th -B
  • 2. Handling Memory
  • 3. • Process A's virtual address space• Physical memory• Process B's virtual address space
  • 4. Memory ManagementThe initial memory management schemes were constrained in size by the relatively small memory resources of
  • 5. UNIX was developed on the PDP machines
  • 6. Pre 3BSD system use swapping exclusively to handle memory contention among processes
  • 7. If there is too much contention, processes are swapped out until enough memory is available
  • 8. Allocation of both main memory and swap space is done first-fit Paging Berkeley UNIX systems depend primarily on paging for memory-contention management, and depend only secondarily on swapping
  • 9. Demand paging – When a process needs a page and the page is not there, a page fault tot he kernel occurs, a frame of main memory is allocated, and the proper disk page is read into the frame
  • 10. A page daemon process uses a modified second-chance page-replacement algorithm to keep enough free frames to support the executing processes
  • 11. If the scheduler decides that the paging system is overloaded, processes will be swapped out whole until the overload is relieved PagingPage table entry
  • 14. Swap use tablePage Table Entry and Disk Block DescriptorPage TableRegionDisk Block DescriptorPage Table EntryPage Table EntryDisk Block Descriptor
  • 15. Contains the physical address of page and the following bits:Valid: whether the page content legalReference: whether the page is referenced recentlyModify:whether the page content is modifiedcopy on write: kernel must create a new copy when a process modifies its content (required for fork)Age: Age of the pageProtection: Read/ write permissionPage Table Entry
  • 16. Disk Block DescriptorSwap Device number as there may be several swap devicesBlock number that contains page
  • 17. Page Frame Data Table Entry Swap use Table entry
  • 18. 11
  • 19. Replacement policy