HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT
OS Week 06 Assignment #3: Fork() and Shared Memory
Check TARBALL FORK
- TARBALL “FORK.tar.xz” should be inside the directory.
ls -al FORK.tar.xz
Extract TARBALL and RUN Script
bash 06-WEEK06.sh
Check and Read RESULT
cd $HOME/RESULT/W06/
ls -al
The result will be similar to the following. Check if there are error messages inside these files:
- WEEK06-00-BASIC.txt
- This script checks whether your BASIC settings are correct.
ZCZC 4B52476 WEEKSQ 06 00
ZCZC 4B51FE4 VERSUM 22:0EB59C0C 22:0EB59C0C
ZCZC 4B528AD VERINC 48:25903FEE 48:25903FEE
ZCZC 4B518C3 SCRIPT # REV07: Wed 04 Oct 2023 16:00
ZCZC 4B53988 XCHECK HOST cbkadal USER cbkadal GROUP cbkadal HOME /home/cbkadal/ ARCH x86_64 NPROC 4
ZCZC 4B5AEBA VERDSK 23G 32G 2AB74ACBA35B 94C4C6D37149
ZCZC 4B54991 CMOUN1 /dev/sdb2 /mnt/lfs ext4 rw,relatime 0 0
ZCZC 4B50F11 CMOUN2 /dev/sdb1 /mnt/cbkadal ext4 rw,relatime 0 0
ZCZC 4B5836B VERLNX 6.1.0-13-amd64
ZCZC 4B55BC6 DISTRO Description: Debian GNU/Linux 12 (bookworm)
ZCZC 4B5B164 CHDIR1 RESULT YES
ZCZC 4B5468D CHDIR2 mydemo YES
ZCZC 4B59206 CHDIR3 mywork YES
ZCZC 4B5F0C5 CHDIR4 git/os232/TXT YES
ZCZC 4B5C180 CHDIR5 git/os YES
ZCZC 4B5BDFA RESULT ===== RESULT IN /home/cbkadal/RESULT/W06/WEEK06-00-BASIC.txt =====
- WEEK06-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: Apt 2.6.1 >= 2.6
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: Dpkg 1.21.22 >= 1.21
OK: Findutils 4.9.0 >= 4.9
OK: Fusermount 2.9.9 >= 2.9
OK: Gawk 5.2.1 >= 5.2
OK: GCC 12.2.0 >= 12.2
OK: GCC (C++) 12.2.0 >= 12.2
OK: Git 2.39.2 >= 2.39
OK: Gnupg 2.2.40 >= 2.2
OK: Grep 3.8 >= 3.8
OK: Gzip 1.12 >= 1.12
OK: Lynx 2.9.0dev >= 2.9
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: Rsync 3.2.7 >= 3.2
OK: Sed 4.9 >= 4.9
OK: Tar 1.34 >= 1.34
OK: Texinfo 6.8 >= 6.8
OK: Vim 9.0 >= 9.0
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 4BDC246 WEEKSQ 06 01
ZCZC 4BDC24C VERSUM 7C:65B2F82D 7C:65B2F82D
ZCZC 4BDD805 VERINC 48:25903FEE 48:25903FEE
ZCZC 4BDDE02 SCRIPT # REV09: Tue 17 Oct 2023 15:00
ZCZC 4BD733B RESULT ===== RESULT IN /home/cbkadal/RESULT/W06/WEEK06-01-VERSION.txt =====
- compare program fork1.c and fork2.c
- compare the variable “sharePtr” in fork1.c and fork2.c
- compare the result of fork1 and fork2