HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT
OS Week 05 Assignment #4: Memory
Check TARBALL MEMORY
- TARBALL “memory.tar.xz” should be inside the directory.
ls -al memory.tar.xz
Extract TARBALL
bash 05-WEEK05a.sh
ls -al memory/
cd memory/
Modify memory/mymemory2.c
- Rearrange the function “printMyAddress()” so that the addresses display from lower to upper memory.
- The sequence number should be from “ZCZC ADDR 01” to “ZCZC ADDR 25” (The logical addresses may vary).
ZCZC ADDR 01 0X00005630880981C5 getEpoch()
ZCZC ADDR 02 0X000056308809823C getHost()
ZCZC ADDR 03 0X0000563088098282 getUserName()
ZCZC ADDR 04 0X00005630880982AB getStamp()
ZCZC ADDR 05 0X0000563088098423 printMyAddress()
ZCZC ADDR 06 0X0000563088098460 main()
ZCZC ADDR 07 0X000056308809B050 &pcounter
ZCZC ADDR 08 0X000056308809B080 bufEpoch
ZCZC ADDR 09 0X000056308809B100 bufHostName
ZCZC ADDR 10 0X000056308809B180 bufSTAMP
ZCZC ADDR 11 0X00007F1BEFBAB010 intArray
ZCZC ADDR 12 0X00007F1BEFFE8FC0 atol()
ZCZC ADDR 13 0X00007F1BF0002CF0 printf()
ZCZC ADDR 14 0X00007F1BF0002E70 sprintf()
ZCZC ADDR 15 0X00007F1BF00209C0 fgets()
ZCZC ADDR 16 0X00007F1BF0022550 popen()
ZCZC ADDR 17 0X00007F1BF0029310 pclose()
ZCZC ADDR 18 0X00007F1BF00A15C0 gethostname()
ZCZC ADDR 19 0X00007F1BF00E0D20 getlogin()
ZCZC ADDR 20 0X00007F1BF0106FF0 strcmp()
ZCZC ADDR 21 0X00007F1BF010BF70 strcat()
ZCZC ADDR 22 0X00007F1BF010CFF0 strcpy()
ZCZC ADDR 23 0X00007FFE34A69EF0 &intArray
ZCZC ADDR 24 0X00007FFE34A69EFC &localdummy
ZCZC ADDR 25 0X00007FFE34A69F00 &guestInfo
Run Script
cd ..
bash 05-WEEK05b.sh
Check and Read RESULT
cd $HOME/RESULT/W05/
ls -al
ℼ
The result will be similar to the following. Check if there are error messages inside these files:
- WEEK05-00-BASIC.txt
- This script checks whether your BASIC settings are correct.
ZCZC 0BEB6C5 WEEKSQ 05 00
ZCZC 0BE1AEA VERSUM 22:0EB59C0C 22:0EB59C0C
ZCZC 0BEDFA6 VERINC 48:25A382AD 48:25A382AD
ZCZC 0BE57E0 SCRIPT # REV07: Wed 04 Oct 2023 16:00
ZCZC 0BE8F31 XCHECK HOST cbkadal USER cbkadal GROUP cbkadal HOME /home/cbkadal/ ARCH x86_64 NPROC 4
ZCZC 0BEB1F5 VERDSK 23G 32G 2AB74ACBA35B 94C4C6D37149
ZCZC 0BE1041 CMOUN1 /dev/sdb2 /mnt/lfs ext4 rw,relatime 0 0
ZCZC 0BE72E0 CMOUN2 /dev/sdb1 /mnt/cbkadal ext4 rw,relatime 0 0
ZCZC 0BE7425 VERLNX 6.1.0-13-amd64
ZCZC 0BE82A3 DISTRO Description: Debian GNU/Linux 12 (bookworm)
ZCZC 0BEA468 CHDIR1 RESULT YES
ZCZC 0BEE62D CHDIR2 mydemo YES
ZCZC 0BE521B CHDIR3 mywork YES
ZCZC 0BE586A CHDIR4 git/os232/TXT YES
ZCZC 0BEF2BC CHDIR5 git/os YES
ZCZC 0BE7867 RESULT ===== RESULT IN /home/cbkadal/RESULT/W05/WEEK05-00-BASIC.txt =====
- WEEK05-01-VERSION.txt
- The purpose of this script is to see whether the host system has all the appropriate Debian package versions (adapted from the “LFS (Linux From Scratch) Book.”)
OK: Bash 5.2.15 >= 5.2
OK: Binutils 2.40 >= 2.40
OK: Bison 3.8.2 >= 3.8
OK: Coreutils 9.1 >= 9.1
OK: Diffutils 3.8 >= 3.8
OK: Findutils 4.9.0 >= 4.9
OK: Gawk 5.2.1 >= 5.2
OK: GCC 12.2.0 >= 12.2
OK: GCC (C++) 12.2.0 >= 12.2
OK: Grep 3.8 >= 3.8
OK: Gzip 1.12 >= 1.12
OK: M4 1.4.19 >= 1.4.19
OK: Make 4.3 >= 4.3
OK: Patch 2.7.6 >= 2.7
OK: Perl 5.36.0 >= 5.36
OK: Python 3.11.2 >= 3.11
OK: Sed 4.9 >= 4.9
OK: Tar 1.34 >= 1.34
OK: Texinfo 6.8 >= 6.8
OK: Xz 5.4.1 >= 5.4
OK: Linux Kernel 6.1.0 >= 6.1
OK: Linux Kernel supports UNIX 98 PTY
Aliases:
OK: awk is GNU
OK: yacc is Bison
OK: sh is Bash
Compiler check:
OK: g++ works
ZCZC 0BEA775 WEEKSQ 05 01
ZCZC 0BEDE38 VERSUM 72:8B021541 72:8B021541
ZCZC 0BEDFA6 VERINC 48:25A382AD 48:25A382AD
ZCZC 0BE0A50 SCRIPT # REV08: Wed 04 Oct 2023 16:00
ZCZC 0BE6085 RESULT ===== RESULT IN /home/cbkadal/RESULT/W05/WEEK05-01-VERSION.txt =====
- WEEK05-05a-MYMEMORY.txt
ZCZC 0B1107B WEEKSQ 05 05a
ZCZC 0B1512B VERSUM 23:92CA2ED2 23:92CA2ED2
ZCZC 0B17447 VERINC 48:25A382AD 48:25A382AD
ZCZC 0B10E5D SCRIPT # REV06: Wed 04 Oct 2023 16:00
ZCZC 0B16FA2 VERLNX 6.1.0-13-amd64
ZCZC 0B19811 DIRECTORY Makefile mymemory1.c mymemory2.c
ZCZC 0B1C23D RESULT ===== RESULT IN /home/cbkadal/RESULT/W05/WEEK05-05a-MYMEMORY.txt =====