Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an explanation on the paging qn asked in 'The Social Network'?

"Suppose you are given a computer with a 16-bit virtual address and a page size of 256 bytes. The system uses 1-level page tables that start at address hex 400. Maybe you want DMA...who knows? The first few pages are reserved for hardware flags, etc. Assume page table entries have 8 status bits. The 8 status bits would be..."

http://www.youtube.com/watch?v=-3Rt2_9d7Jg

Can someone explain why the answer is as Mark/Jesse described?

like image 886
Evil Washing Machine Avatar asked Jan 29 '14 22:01

Evil Washing Machine


1 Answers

According to this page documenting some technical inaccuracies of The Social Network, the question is a (badly) derived from a question from an actual Harvard course.

A sample problem: Suppose we are given a computer with a 16-bit virtual addresses, and a page size of 256 bytes. The system uses one-level page tables, which start at address 0x0400. (The first few pages are reserved for hardware flags, etc. Maybe you wanted to have DMA on your 16-bit system, who knows?) Assume page table entries have eight status bits: 1 valid bit, 1 modify bit, 1 reference bit, and 5 permissions bits (this is a very secure system).

How many pages are there? How much memory do the page tables require?

The 8 status bits are architecture dependent and, in this particular problem, is made up as an assumption for an imaginary computer. The movie producers simply took the problem description and made one of the assumptions the question - a question that doesn't make sense to ask in the first place.

To more easily understand this, imagine that you have a question like the following

A car traveled across a road for 1 hour. Assuming the car's speed is 100km/h, how much distance did the car travel?

and the question turned into

A car traveled across a road for 1 hour. The speed of the car was...?

Edit: Didn't realise the original article used a similar analogy to mine.

like image 186
tangrs Avatar answered Oct 24 '22 07:10

tangrs