What you will learn
- Describe the role of an operating system
- Distinguish a running process from a stored program
- Explain basic memory and file-system responsibilities
What does an operating system do?
An operating system (OS) is the core software layer that manages a computer's resources and provides services to applications. It helps programs use the processor, memory, storage and connected devices without each program having to control the hardware directly.
Examples include desktop operating systems, mobile operating systems and server operating systems. Their interfaces differ, but many core responsibilities are similar.
Program versus process
A program is a set of instructions stored for execution. A process is a running instance of a program, together with the state and resources the operating system tracks for it. Opening the same application twice can create more than one process, depending on how the application is designed.
A process has an execution state and may have one or more threads. The operating system schedules runnable work so that processes and threads receive time on available CPU cores.
CPU scheduling and multitasking
Many applications appear to run at the same time. The operating system coordinates this by switching between runnable tasks and allocating CPU time. On a multi-core processor, more than one task may run at once. Scheduling decisions can consider responsiveness, fairness, priority and workload requirements.
When a computer becomes slow, the cause may be CPU usage, memory pressure, storage activity, network delays or an application waiting for another service. The OS helps expose these resource measures through system-monitoring tools.
Memory management
Applications need memory to hold instructions and working data. The operating system manages which memory regions belong to which process and helps prevent one program from freely overwriting another program's memory.
Virtual memory gives processes an address space that the OS and hardware map to physical memory and, where supported, other storage mechanisms. It helps with isolation and flexible allocation, but it does not mean that a computer has unlimited fast memory. When working sets exceed available RAM, performance can degrade because the system must move data between memory and storage.
Files and file systems
A file system organizes data on storage devices. It tracks names, directories, metadata and the locations of file contents. Different operating systems support different file systems and features. Permissions help control which users or processes can read, write or execute files.
A folder is a way to organize references to files. A file name alone does not explain who can access the file or whether it is backed up. Storage permissions, encryption and backup policies are separate parts of managing data safely.
How the OS connects hardware and applications
Applications normally request operating-system services through defined interfaces. For example, a text editor asks the OS to open a file, read data, save changes or display information. Device drivers help the OS communicate with particular hardware. The OS coordinates these requests and enforces resource and access rules.
Worked example: attending an online class
When a student opens a video meeting, the OS creates or manages processes for the meeting application and related services. It allocates memory for the application, schedules CPU time for audio and video work, reads configuration files, communicates with the network interface and handles camera and microphone access. If too many programs compete for resources, video may stutter even when the internet connection is stable.
Practice task
- Open the task or activity monitor on a computer you are allowed to use.
- Identify one process and record its CPU and memory use.
- Find where the operating system displays storage information.
- Explain why closing an unused application might improve performance.
- Describe one reason file permissions matter on a shared computer.
Quick review
- The OS manages hardware resources and provides services to applications.
- A process is a running instance of a program.
- Scheduling allocates CPU time among runnable work.
- Memory management supports allocation and isolation.
- A file system organizes stored information and metadata.
Further reading
- Virtual University of Pakistan OpenCourseware: CS604: Operating Systems
- University of California San Diego: CSE 120: Principles of Computer Operating Systems
- Operating Systems: Three Easy Pieces: Free online textbook