Skip to content

CS 631-02 Systems Foundations — Meeting Summary

  • Date: Apr 28, 2026
  • Time: 02:50 PM Pacific Time (US and Canada)
  • Meeting ID: 882 2309 0019

Quick Recap

  • Steven Alum presented a startup concept: an app to help tutor students build networking skills by analyzing speech patterns and organizing networking activities. He requested survey responses and invited applications for unpaid summer internships.
  • Greg delivered an in-depth lecture on Unix-like operating systems, focusing on processes, system calls, and the boundary between user space and kernel space. Topics included fork and exec, process creation and replacement, file descriptors, redirection, and practical examples in the OctUX environment.

Next Steps

  • Greg
  • Pull the latest changes/updates from the repository for the next assignment (no explicit deadline).

  • Collaboration

  • All participants: Complete Steven Alum’s survey on networking skills and experiences (no explicit deadline).
  • Interested students: Send resumes to Steven Alum for a potential unpaid summer internship (no explicit deadline).

Detailed Summary

Networking App Internship Opportunity

  • Steven Alum (CS alumnus) outlined an app to:
  • Analyze student speech to improve networking skills.
  • Manage and track networking activities.
  • He shared a survey link for market research.
  • He invited students to an unpaid summer internship, with potential equity if funding is secured.
  • He noted he begins a full-time role at Oracle in June but aims to support the community by launching a student internship program.

Operating Systems: Processes and System Calls

  • Greg continued the series on operating systems with emphasis on:
  • The separation of user space and kernel space.
  • Chrome’s multi-process model as an example of isolation (pages and JavaScript in separate processes).
  • The Process Control Block (PCB), which includes:
    • Page tables
    • File descriptor table
    • Process ID (PID) and related metadata
  • The discussion will continue Thursday with a deeper dive into kernel implementation.

System Calls and Kernel Mode

  • System calls provide controlled entry to kernel services (file I/O, networking, process creation).
  • Transition mechanism:
  • User mode to kernel mode via an instruction such as ecall.
  • Restricted access to privileged instructions and unmapped memory in user mode.
  • On entry, the kernel switches to a dedicated kernel stack to handle internal calls safely.

Program Execution and Memory Management

  • Execution flow alternates between user space and kernel space (e.g., on I/O).
  • Processes may block while waiting for input/output.
  • Virtual memory:
  • Maps virtual addresses to physical memory.
  • Falls back to disk when RAM is insufficient, though modern systems rarely swap due to abundant RAM and faster storage.
  • Historical context contrasted limited-memory environments of the past with today’s more efficient memory management.

Process Scheduling

  • The kernel schedules processes onto available cores, time-slicing to multiplex many processes over few cores.
  • Schedulers classify workloads (compute-bound vs. I/O-bound) and strive for fairness, especially toward I/O-heavy tasks.
  • While machine learning is not commonly used in schedulers today, scheduling remains a well-studied area.
  • Containers were briefly mentioned for resource isolation.

Multiprogramming and System Call Conventions

  • Early systems used multiprogramming to run multiple tasks on single-processor machines.
  • System call interface details:
  • Registers convey arguments; e.g., an A-register convention where A7 carries the system call number.
  • File descriptors:
  • Each process has a file descriptor table.
  • Standard descriptors: 0 (stdin), 1 (stdout), 2 (stderr).
  • These enable Unix features such as redirection and process chaining via fork and exec.

File Opening Modes and I/O Details

  • File open flags include write-only, create, and truncate.
  • Argument passing to programs (e.g., in C or Rust) and retrieval of arguments were discussed.
  • The read system call:
  • Returns the number of bytes read.
  • Handles variable-length reads depending on file and buffer states.
  • Differences were noted between Unix and Windows end-of-file handling.
  • POSIX compliance and portability considerations across Unix variants were briefly reviewed.

ps aux and Process Management

  • Interpreting ps aux:
  • CPU and memory usage metrics
  • State codes such as S (sleeping) and R (running)
  • Process IDs and hierarchy
  • Process relationships:
  • Parents create children; processes form groups.
  • Orphaned processes are re-parented to init for proper cleanup.

Process Creation with fork

  • fork creates a new process by duplicating the parent’s address space (code, stack, heap) into the child.
  • Return values:
  • Child receives 0
  • Parent receives the child’s PID
  • wait allows a parent to wait for child termination.
  • Memory independence:
  • Post-fork, each process has its own address space; changes (e.g., incrementing a variable) do not affect the other.

RISC-V Demonstrations: fork and exec

  • fork on RISC-V:
  • Copies the parent’s memory and process metadata to create a child process.
  • exec:
  • Replaces the current process’s code and data with a new program and does not return on success.
  • Combined usage:
  • Enables process creation and output redirection to files.
  • Upcoming topics:
  • Pipes
  • Deeper kernel implementation details

Practical Examples in OctUX

  • The session included practical demonstrations of:
  • Process redirection
  • File descriptor management
  • Using fork and exec to orchestrate process behavior and I/O in the OctUX environment

Notes: - No explicit deadlines were specified for repository updates, survey responses, or internship applications.