Home Projects Portfolio Dashboard Export PDF Log in
Shell

Automating OS Fundamentals: Lessons from the UTN-FRA Exam Project

The Challenge

Operating Systems exams often require more than just theoretical knowledge; they demand a practical understanding of process management, shell scripting, and resource orchestration. Working on the UTN-FRA_SO_2do_Parcial project allowed us to bridge the gap between classroom concepts and hands-on system administration.

The Approach

Our focus was to streamline repetitive system tasks using Shell scripting, ensuring that environment setup and process verification could be handled reliably under exam conditions.

Designing for Repeatability

To ensure our scripts performed consistently across different evaluation environments, we prioritized modularity. By breaking down complex logic into small, re-usable functions, we minimized debugging time.

#!/bin/bash

# Generic resource verification script
check_resources() {
  echo "Verifying system resources..."
  if [ -f /proc/meminfo ]; then
    grep MemTotal /proc/meminfo
  fi
}

check_resources

Improving Error Handling

One of the most critical aspects of our script development was ensuring graceful failure. Rather than allowing a script to hang, we implemented explicit exit status checks. This provides immediate feedback when a process fails to initialize.

# Ensuring process exists before execution
command_name="some_process"
if ! command -v "$command_name" &> /dev/null; then
    echo "Error: $command_name not found."
    exit 1
fi

Key Takeaways

  • Modularity is King: Always decompose complex shell scripts into smaller, testable functions.
  • Exit Status Matters: Always validate commands with conditional checks to avoid silent failures.
  • Documentation saves time: Even in short-lived exam projects, clear comments act as a map when you are under pressure.

By treating the exam project as a real-world software repository, we turned standard OS exercises into a robust suite of automation tools.


Generated with Gitvlg.com

Automating OS Fundamentals: Lessons from the UTN-FRA Exam Project
Carola Castanheira Becq

Carola Castanheira Becq

Author

Share: