So linux dynamic linker 375 leal ia32 load effective

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: t disadvantage is that it assumes that pointers are at least as large as ints. While this assumption is true for all modern systems, it might not be true for legacy or future systems. Problem 11.7 Solution: [Pg. 600] A. This program always deadlocks because the initial state is within the deadlock region.. B. To eliminate the deadlock, initaliaize the binary semaphore t to 1 instead of 0. B.12 Network Programming Problem 12.1 Solution: [Pg. 613] Hex address 0x0 0xffffffff 0x7f000001 0xcdbca079 0x400c950d 0xcdbc9217 Problem 12.2 Solution: [Pg. 614] Dotted decimal address 0.0.0.0 255.255.255.255 127.0.0.1 205.188.160.121 64.12.149.13 205.188.146.23 code/net/hex2dd.c 1 2 3 4 5 6 7 #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 */ B.12. NETWORK PROGRAMMING 8 9 10 11 12 13 14 15 16 17 737 if (argc != 2) { fprintf(stderr, "usage: %s <hex number>\n", argv[0]); exit(0); } sscanf(argv[1], "%x", &addr); inaddr.s_addr = htonl(addr); printf("%s\n", inet_ntoa(inaddr)); e...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online