Paging Virtual Address Translation
Category: Computers > Operating Systems
Asked by: siball-ga
List Price: $20.00
18 Oct 2005 14:57 PDT
Expires: 17 Nov 2005 13:57 PST
Question ID: 581846
Suppose the page size in a computing environment is 1KB. Give the page number and the offset for the following: a. 899 (a decimal number) b. 23456 (a decimal number) c. 0x3F244 (a hexadecimal number) d. 0x0017C (a hexadecimal number)
Re: Paging Virtual Address Translation
Answered By: leapinglizard-ga on 18 Oct 2005 17:18 PDT
Dear siball, If the page size is 1 KB, then there are 1024 bytes from the start of one page to the next. Thus, all the addresses from 0 to 1023 are in the first page; all addresses from 1024 to 2047 are in the second page; and so on. If we are given a physical address, we can determine its page number by dividing it by 1024. The remainder of this division then gives us the offset. a. If we divide 899 by 1024, we obtain 0 with a remainder of 899. 899 / 1024 = 0 rem 899 Therefore, the page number is 0 and the offset is 899. b. 23456 / 1024 = 22 rem 928 The page number is 22 and the offset is 928. c. 1024 in hexadecimal is 0x400. 0x3F244 / 0x00400 = 252 rem 580 The page number is 252 and the offset is 580. d. 0x0017C / 0x00400 = 0 rem 380 The page number is 0 and the offset is 380. Regards, leapinglizard
rated this answer:
Fast, clear, well explained answer. Just what I was looking for. Thank you very much.
|There are no comments at this time.|
If you feel that you have found inappropriate content, please let us know by emailing us at firstname.lastname@example.org with the question ID listed above. Thank you.
|Search Google Answers for|