10 likes | 65 Views
Anatomy of an Executable (‘write-boundary’). 12577. On Disk:. 12847. 0. 4096. 8192. 12288. 41721. …. In Virtual Memory:. what load_segment says you should zero. what load_segment says you should read. 8048000. 8049000. 804A000. 804B000. 804C000. 804D000. 804E000. read only.
E N D
Anatomy of an Executable (‘write-boundary’) 12577 On Disk: 12847 0 4096 8192 12288 41721 ….. In Virtual Memory: what load_segment says you should zero what load_segment says you should read 8048000 8049000 804A000 804B000 804C000 804D000 804E000 read only read/write Code and Read-Only Data Other sections: Debugging Info, etc. Initialized Global Data Uninitialized Global Data (Must Zero) “impurities” – the content of these areas is undefined as far as the program is concerned. For simplicity, they can be filled with data from the executable – this allows all page-in operation to read 4096 (PGSIZE) bytes from a file offset that is a multiple of PGSIZE. This is useful for filesystems that use a 4096 byte blocksize – you only need to store the block number and have all information for a page-in. Pintos’s load_segment code computes offsets that are multiples of 4096; it also computes for you how many bytes should be read from that offset, as shown above. Not drawn to scale Note: the specific numbers came from an older version of our toolchain; they should be ignored. The principle hasn’t changed.