300 levels in 300 memory management unit see mmu

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: xit(0); } code/net/hex2dd.c Problem 12.3 Solution: [Pg. 614] code/net/dd2hex.c 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include "csapp.h" int main(int argc, char **argv) { struct in_addr inaddr; /* addr in network byte order */ unsigned int addr; /* addr in host byte order */ if (argc != 2) { fprintf(stderr, "usage: %s <dotted-decimal>\n", argv[0]); exit(0); } if (inet_aton(argv[1], &inaddr) == 0) app_error("inet_aton error"); addr = ntohl(inaddr.s_addr); printf("0x%x\n", addr); exit(0); } code/net/dd2hex.c Problem 12.4 Solution: [Pg. 618] Each time we request the host entry for aol.com, the list of corresponding Internet addresses is returned in a different, round-robin order. unix> ./hostinfo aol.com official hostname: aol.com address: 205.188.146.23 address: 205.188.160.121 address: 64.12.149.13 unix>> ./hostinfo aol.com 738 official address: address: address: hostname: aol.com 64.12.149.13 205.188.146.23 205.188.160.121 APPENDIX B. SOLUTIONS TO PRACTICE PROBLEMS unix>> ./hostinfo aol.com official hostname: aol.com address: 205.188.146.23 address: 205.188.160.121 address: 64.12.149.13 The different ordering of the addresses in different DNS queries is known as DNS round-robin. It can be used to load-balance requests to a heavily used domain name. Problem 12.5 Solution: [Pg. 640] When the parent forks the child, it gets a copy of the connected descriptor and the reference count for the associated fil...
View Full Document

Ask a homework question - tutors are online