2.1.3

Paging, Segmentation & Virtual Memory

Test yourself

Paging

Operating systems are responsible for managing memory for the user. Managing memory can be done by paging or by segmentation.

Illustrative background for PagingIllustrative background for Paging ?? "content

Paging

  • Paging splits the main memory (RAM) into 4 kb sections known as pages.
  • When programs run they are allocated a set number of pages to run in.
  • Programs can be split across lots of pages that are non-contiguous (not all together).
  • This is managed by a table map.
Illustrative background for PerformanceIllustrative background for Performance ?? "content

Performance

  • Performance is not affected by having non-contiguous pages for your program.
  • Any pages being used that are not active can be sent to virtual memory to free pages up for other tasks.
  • Performance may be affected if some programs are split (e.g. when parts of a looping function are split across pages)

Segmentation

Operating systems are responsible for managing memory for the user. Managing memory can be done by paging or by segmentation.

Illustrative background for SegmentationIllustrative background for Segmentation ?? "content

Segmentation

  • There is no physical split in segmentation like in paging.
  • Each program is given a logical division of memory to operate in.
Illustrative background for Segmentation processIllustrative background for Segmentation process ?? "content

Segmentation process

  • When a program loads, it is given enough memory for the parts it is currently trying to load.
  • The rest of the program is kept in storage until needed, but the logical section given to the program will need to be made bigger.
  • Programs that are split across logical splits (non-contiguous) suffer greatly for not being together.
Illustrative background for Virtual memoryIllustrative background for Virtual memory ?? "content

Virtual memory

  • Segmentation can also use virtual memory to store unused parts of programs in virtual memory to free space for something else.

Jump to other topics

1Components of a Computer

2Software & Software Development

3Exchanging Data

4Data Types, Data Structures & Algorithms

5Legal, Moral, Cultural & Ethical Issues

6Elements of Computational Thinking

6.1Thinking Abstractly

6.2Thinking Procedurally

6.3Thinking Logically

7Problem Solving & Programming

8Algorithms

Go student ad image

Unlock your full potential with GoStudent tutoring

  • Affordable 1:1 tutoring from the comfort of your home

  • Tutors are matched to your specific learning needs

  • 30+ school subjects covered

Book a free trial lesson