{"action":"created","issue":{"url":"https://api.github.com/repos/intermezzOS/book/issues/100","repository_url":"https://api.github.com/repos/intermezzOS/book","labels_url":"https://api.github.com/repos/intermezzOS/book/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/intermezzOS/book/issues/100/comments","events_url":"https://api.github.com/repos/intermezzOS/book/issues/100/events","html_url":"https://github.com/intermezzOS/book/issues/100","id":156118374,"number":100,"title":"Virtual/Physical address space unclear why it's needed","user":{"login":"LaylConway","id":3094382,"avatar_url":"https://avatars.githubusercontent.com/u/3094382?v=3","gravatar_id":"","url":"https://api.github.com/users/LaylConway","html_url":"https://github.com/LaylConway","followers_url":"https://api.github.com/users/LaylConway/followers","following_url":"https://api.github.com/users/LaylConway/following{/other_user}","gists_url":"https://api.github.com/users/LaylConway/gists{/gist_id}","starred_url":"https://api.github.com/users/LaylConway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaylConway/subscriptions","organizations_url":"https://api.github.com/users/LaylConway/orgs","repos_url":"https://api.github.com/users/LaylConway/repos","events_url":"https://api.github.com/users/LaylConway/events{/privacy}","received_events_url":"https://api.github.com/users/LaylConway/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-05-21T19:46:24Z","updated_at":"2016-05-22T17:36:50Z","closed_at":null,"body":"In the [paging section of the book](https://github.com/intermezzOS/book/blob/master/src/paging.md#paging-1), the following bit of text attempts to explain why paging is needed.\r\n\r\n> Each location in memory has an address, and we can use the address to distinguish between the cells: the value at cell zero, the value at cell ten. But how many cells are there? This question has two answers: the first answer is, how many addresses do we have to hand out? In 64-bit mode, we can create addresses from zero to (2^64) - 1. That’s 18,446,744,073,709,551,616 addresses! We sometimes refer to a sequence of addresses as an ‘address space’, so we might say “The full 64-bit address space has 2^64 addresses.” The other answer is, how much physical RAM do we have in our machine? That will vary per machine. My machine has 8 gigabytes of memory, 8,589,934,592 bytes. But maybe your machine has 4 gigabytes of memory, or sixteen gigabytes of memory. How can we make this work?\r\n\r\nIt is to me unclear what the problem with this is and why a distinction between virtual and physical addresses will solve it. Perhaps an update of the text is needed to better explain this?"},"comment":{"url":"https://api.github.com/repos/intermezzOS/book/issues/comments/220845221","html_url":"https://github.com/intermezzOS/book/issues/100#issuecomment-220845221","issue_url":"https://api.github.com/repos/intermezzOS/book/issues/100","id":220845221,"user":{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false},"created_at":"2016-05-22T17:36:50Z","updated_at":"2016-05-22T17:36:50Z","body":"Yeah, I like it. Or \"we won't see the full benefit of this until later\", something along these lines.\n\nI do agree that hiding too much is very unsatisfying, and kind of the opposite of what the project is about! It's a tough balance.\n\n\nOn May 22, 2016, 12:54 -0400, Ryan Levick<notifications@github.com>, wrote:\n>  \n> Yea that could work. I find \"we just need to do this; don't ask too many questions\" very unsatisfying when I read. I like the parts of the book so far that really stress things we need to do because of legacy reasons, but I still feel like it would be better if we had some appendices going into more depth as to why.\n>  \n>  \n> For this section, I think it might be appropriate to say something to the effect of \"in order to go into full 64-bit mode, we need to set up something called paging. Paging is certain way to implement something called \"virtual memory\" which will allow the OS to hide the details of the memory layout of the physical machine from programs that run on the computer. The reasons why this is a good idea will come up later in our chapter on 'user spaces'. For now, we'll just take this as something seemingly random we have to do to get into full 64-bit 'long mode'\".\n>  \n>  \n> Does something like that work? It lets the reader know that this isn't totally random, but that we're not quite ready to fully understand why we need to do this.\n>  \n>  \n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly orview it on GitHub(https://github.com/intermezzOS/book/issues/100#issuecomment-220842984)\n>  \n>  \n>  \n\n\n"}}
{"actor":{"display_login":"steveklabnik"}}