cd week_one

Journal Entry Week 1

    This week was my first real dive into operating systems. Before this class, I saw the OS as just the thing that boots up my laptop. Now I’m starting to see it as the manager of everything happening behind the scenes.

Topics We Covered

The main topics we covered were:

  • What a program does and how the CPU executes instructions
  • The role of the operating system
  • Virtualization
  • Memory basics
  • Concurrency and multithreading
  • Persistence and file systems
  • OS goals (performance, security, reliability, etc.)
  • Basic computer architecture (CPU, RAM, buses, storage hierarchy)
  • Memory layout of a running program (stack, heap, text, data)
  • Basic command line and compilation workflow

Explaining the Topics:

    A program is basically a list of instructions, and the CPU’s job is to fetch, decode, and execute those instructions one by one. That seems simple, but when you zoom out, thousands (or millions) of instructions are flying by every second.

    The operating system acts like a resource manager. It makes sure programs can run at the same time, share memory safely, and use hardware devices without stepping on each other. Virtualization is when the OS makes one physical CPU look like many CPUs, and one chunk of physical memory look like separate memory spaces for different apps. It’s kind of like a controlled illusion.

    Memory is just an array of bytes, but everything depends on it from instructions, variables, to data structures. The memory layout (text, data, heap, stack) helped me understand what’s actually happening when a program runs. The stack storing function calls and the heap storing dynamic memory made things from C programming click a little more.

    We also talked about concurrency and threads. That’s when things started to feel more complex since multiple things are running at once in the same memory space and can cause problems.

Least-Understood Topics:

    The hardest concepts for me were virtualization and concurrency. I understand the idea that the OS pretends there are multiple CPUs or separate memory spaces, but I don’t fully understand how that illusion is technically enforced. I get that virtual memory maps to physical memory, but I am wondering how the hardware and OS coordinate that without chaos.

    Concurrency also feels tricky. I understand that running multiple processes at once can create race conditions or fairness issues, but I still struggle to picture exactly how those problems show up in real code.

Nature of My Confusion

What makes sense:

  • Programs execute step by step.
  • Memory is addressed and organized.
  • The OS manages resources.

What’s still fuzzy:

  • How context switching actually works at a low level.
  • How the CPU switches between processes so quickly.
  • How isolation between programs is enforced in detail.

I think I understand the big picture, but the mechanics underneath it are yet to be understood.

“Aha” Moments

    The biggest “aha” moment was realizing that the OS is basically solving one core problem: how to provide resources in an easy, reliable, fair, and secure way. Everything connects back to that. Virtual memory? That’s about fairness and isolation. CPU scheduling? That’s about efficiency and fairness. File systems? That’s about persistence and reliability.

    Another big moment was seeing how computer architecture connects directly to OS design. Things like registers, the program counter, and the storage hierarchy aren’t just hardware trivia. They directly shape how software works.

Questions & What Comes Next

    I’m wondering if we’ll next dive deeper into scheduling and process management. How does the OS decide who runs next? Also, how deep will we go into how virtual memory is implemented.

Connections to Other Classes

    This week connected strongly to programming in C. The stack and heap explain why stack overflows happen and why memory leaks are dangerous. It also connects to databases (ACID, isolation).

Final Thoughts

    Overall, this week made me realize that operating systems aren’t just background software. They are the reason everything works smoothly. It feels like we are finally looking under the hood, and while some of it is still very confusing, it’s also really interesting.

Comments

Popular posts from this blog

Cohort 24 Take Off

Week Força

Week Toosie