On a Linux machine (a VM, WSL or a cloud instance), investigate memory management in a running system. Record the commands and outputs.
free -handcat /proc/meminfo | head -20: explain total, used, free, available, buffers/cache. Why is "free" usually small on a healthy system?- Start a Java or Python process and inspect
/proc/<pid>/maps(orpmap -x <pid>): identify the code, heap, stack and shared-library regions. Which libraries are shared with other processes? getconf PAGESIZE,cat /proc/buddyinfoandgrep Huge /proc/meminfo: what is the page size, how many free blocks of each order exist, and are transparent huge pages enabled (cat /sys/kernel/mm/transparent_hugepage/enabled)?- Run a container with a memory limit:
docker run --rm -m 256m python:3-slim python -c "a = bytearray(512*1024*1024)". What happens? Checkdocker inspect/dmesgfor the OOM kill and explain exit code 137. - Write 5–8 sentences: how would you choose memory requests and limits for the EdgeCampus inference service, and what would you monitor?