FirstHack Learn
Log in Sign up free
Lessons in this course 0/6 All courses Operating Systems

CSE

Progress0 / 6 lessons
  1. 1. What an OS actually does, and what a system call is
  2. 2. Processes vs threads, with a fork() example
  3. 3. CPU scheduling with worked FCFS, SJF and Round Robin numbers
  4. 4. Deadlock: the four conditions and how to break them
  5. 5. Memory: paging, virtual memory and page faults
  6. 6. File systems and how a file is really stored

Courses › Operating Systems

Memory: paging, virtual memory and page faults

Address translation with real hex numbers, and FIFO versus LRU counted out on a reference string.

13 min read · Lesson 5 of 6 · Pro

Every address your program sees is fake

Run two copies of the same program at once and both may print the address 0x55a4c8e012a0 for the same variable. They are not sharing memory. Each sees its own virtual address space, and the hardware maps those virtual addresses to different physical RAM.

Virtual memory buys three things. Isolation — your process has no way to name another process's physical memory. Simplicity — every program is compiled assuming it starts at the same address. More memory than you have — unused pages can sit on disk, so a 6 GB working set runs on a 4 GB machine, slowly.

Pages, frames and translation

The rest of this lesson is Pro

The free lessons of Operating Systems finish what they start — read those first if you have not. This one goes further, and it is part of the paid half.

A pass opens the paid lessons of every course, the mock test papers and the company-wise series. It ends on its own date; nothing renews by itself.

Get a pass — from ₹29 for 7 days

Already bought one? Log in.