Computer Science
80 mins
+85 XP
What you need:
Chromebook/Laptop/PC

Operating Systems Fundamentals

Dive into the essentials of operating systems with this step-by-step lesson. You'll explore what an operating system is, how it manages processes and file systems, and use Python scripting to interact with OS utilities, ending with a reflective summary.
Learning Goals Learning Outcomes Teacher Notes

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - What is an Operating System?

    In this step, you will learn the basics of what an operating system is and its key functions.

    An operating system (OS) is the software that manages computer hardware and software resources. It acts as an intermediary between users and the computer hardware, handling tasks like process management, memory allocation, file systems, and providing a user interface.

    Think about your computer or phone: the OS is what allows you to run programs, save files, and connect to networks. Common examples include Windows, macOS, and Linux.

    2 - Understanding Process Management

    In this step, you will explore how operating systems manage processes, which are instances of running programs.

    A process is a program in execution, and the OS handles creating, scheduling, and terminating processes to ensure efficient use of the CPU. This includes managing multiple processes simultaneously through multitasking.

    To see this in action, open your terminal or command prompt. Depending on your operating system, run the following command to list current processes:

    For Windows, type tasklist; for Linux or macOS, type ps aux.

    # Run this in your terminal:
    # Windows: tasklist
    # Linux/macOS: ps aux

    After running the command, you should see a list of processes, including their names, IDs, and resource usage. This demonstrates how the OS keeps track of all active processes.

    3 - Exploring File Systems

    In this step, you will learn about file systems, which are how operating systems organise and manage files on storage devices.

    A file system structures data on disks, directories, and files, allowing you to store, retrieve, and manage data. The OS handles operations like creating, reading, writing, and deleting files, ensuring data integrity and efficient access.

    To demonstrate, open your terminal or command prompt and list the files in your current directory. Use dir on Windows or ls on Linux/macOS.

    # Run this in your terminal:
    # Windows: dir
    # Linux/macOS: ls

    You should see a list of files and folders in your current location. This shows how the file system organises data hierarchically.

    4 - Hands-on Scripting with Python

    In this step, we will use basic Python scripting to interact with operating system utilities, reinforcing your understanding of processes and file systems.

    Create a new Python file or use an online Python environment if available, and add the following code to list files in the current directory and get the current process ID.

    Add the following code:

    import os
    
    # Get and print the current working directory
    print("Current working directory:", os.getcwd())
    
    # List and print files in the directory
    print("Files in the directory:")
    for file in os.listdir():
        print(file)
    
    # Get and print the current process ID
    print("Current process ID:", os.getpid())

    Then run your code. You should see the current directory path, a list of files in that directory, and your process ID. This script uses Python's os module to access OS utilities, showing how scripting can simplify interactions with processes and file systems.

    5 - Lesson Summary and Reflection

    In this final step, we will summarise what you've learned and reflect on the key concepts.

    You've explored the fundamentals of operating systems, including how they manage processes and organise file systems. Through demos, you've seen processes in action and used scripting to interact with OS utilities. Reflect on how these components work together to make your computer run smoothly – for example, consider how process management prevents conflicts when running multiple applications.

    Take a moment to note down any questions or insights you have about operating systems.

    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of DigitalSkills.org. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more