ExamSaathi learning library · Government exams · RRB JE (CEN 04/2026), 2nd stage CBT, Basics of Computers and Applications: operating systems such as Windows, Unix and Linux, a topic named in the notice · Computer knowledge

Operating systems: functions, types, and Unix and Linux basics

Learn what an operating system does, how the kernel, shell and boot loader fit together, how to tell multiprogramming, time-sharing, real-time and other OS types apart, and the Unix and Linux basics: one file tree from /, everyday commands and rwx permissions.

Status: original pilot lesson. Teacher review is pending. It is not a complete course or official exam material.

You will learn to

Before you start

This lesson builds on three earlier ones:

1. Windows, File Explorer and shortcuts: what an operating system does on a PC, the Windows desktop, File Explorer, file extensions and shortcuts.

2. Computer organisation: the CPU, the buses, and input and output devices.

3. Memory and storage: RAM, ROM, virtual memory and storage drives.

The RRB notice CEN 04/2026 lists 'Operating System like Windows, Unix, Linux' among the Basics of Computers and Applications topics for its 2nd stage CBT. It names the topic but does not say how deeply to study it.

First, sort software into two families. Application software does a job for the person using it: an office suite for letters and duty rosters, a web browser, a photo editor or a game. System software looks after the computer itself, and the operating system (OS) belongs to this family. The OS coordinates the hardware and gives every program standard ways to use the processor, memory, storage and other devices. Its core, the kernel, is always running. Around it sit system programs, such as the basic utilities that list, copy or sort files, and device drivers, small programs each written for one kind of device so that the OS can work with it.

Picture four layers: the hardware at the bottom, the OS above it, application programs above that, and the people who use them on top.

What an operating system does: functions, kernel, shell and booting

The OS stands between programs and the hardware. As resource manager, it decides when each program gets the CPU and how much memory, offers shared services such as disk and network access, and stops any one program taking over. Its main jobs:

1. Process management: starting a program creates a process, which the OS gives memory and CPU time; it can pause, resume or end processes.

2. Memory management: it tracks the memory each program uses and keeps programs out of each other's memory.

3. File management: it shows storage as files in directories (folders) that can be created, renamed, copied and deleted.

4. Device management: it drives each input-output device through its own driver.

5. Security: where there are user accounts, the OS can check who a user is and enforce permissions on files and other resources.

6. User interface: a graphical user interface (GUI) with windows, icons and a mouse, or a command-line interface (CLI) for typed commands.

The kernel, the core of the OS, is loaded into main memory at start-up and keeps running, controlling processes, memory, devices and file systems. The shell faces the user: a command shell such as bash reads each typed command and gets it carried out.

In a typical Linux boot, firmware starts a boot loader such as GRUB, which loads the kernel into main memory. The kernel then launches init, the first process in user space and the root of the process tree; init starts system services and login prompts.

Types of operating system

Operating systems are grouped by use and by hardware.

1. Multiprogramming: several jobs are kept in main memory, so that when one waits for input or output, another can use the CPU. IBM's OS/360 of the 1960s did this.

2. Time-sharing: many users at terminals work on one computer at the same time; the OS schedules their tasks and can account for each user's processor time.

3. Multitasking: the OS carries out several tasks at once; on a single CPU it does this by switching between processes.

4. Multiprocessing: two or more CPUs share one memory, so programs truly run in parallel.

5. Real-time: these systems work under set timing limits. Hard real-time systems, used in manufacturing and aircraft, must meet every required deadline; soft real-time systems, such as audio and video, can tolerate an occasional miss.

6. Embedded and mobile: an embedded OS is built into a device such as a home router, a smart TV or a household appliance and does not install the owner's own software. Phones run mobile OSs such as Android, built on a Linux-based kernel, and iOS.

A single-user OS is designed for one user at a time. Unix and Linux are multi-user, multitasking systems: different users can be logged in at once, for example on separate consoles.

Related idea, not an OS type: in a distributed system, separate networked computers, possibly far apart, work together; each may run its own OS, and middleware, which is not itself an OS, often keeps them consistent.

Unix and Linux: one file tree, commands and permissions

Unix was created at AT&T's Bell Labs in 1969 by Ken Thompson, Dennis Ritchie and colleagues. Linux, first released by Linus Torvalds in 1991, is a Unix-like kernel written afresh without Unix code; the name is also used for whole systems built on it. The Linux kernel is free and open-source software, licensed under version 2 of the GNU General Public License (GPLv2). A Linux distribution, such as Debian or Ubuntu, combines the kernel with GNU tools and many other separately licensed programs into a working OS; individuals, volunteer groups and companies maintain distributions.

One tree: Unix and Linux have no drive letters. Every file hangs from a single tree whose top is the root directory, written /, and other disks are attached (mounted) into it. A full path begins with / and puts / between names, as in /home/asha/notes.txt, while a Windows path begins with a drive letter, as in C:\. Linux file names are case-sensitive.

Commands: pwd prints the current directory; ls lists files; cd changes directory; mkdir makes a directory; cp copies; mv moves or renames; rm removes; cat writes file contents to standard output, so in an ordinary terminal they appear on screen; chmod changes permissions.

Permissions: every file carries read (r), write (w) and execute (x) rights for three classes of user: the owner (u), the file's group (g) and all others (o). ls -l shows a type character (d for a directory, - for a plain file) followed by nine characters, three per class.

Common mistakes

1. Calling the OS application software. Windows, Unix and Linux are system software; an office suite or a game is an application that runs on top.

2. Mixing up kernel and shell. The kernel is the core that manages the CPU, memory and devices; the shell is only the program that takes your commands.

3. Treating multitasking and multiprocessing as one idea. Multitasking can happen on a single CPU by quick switching; multiprocessing needs two or more processors.

4. Treating multiprogramming and time-sharing as the same. Multiprogramming keeps several jobs in memory so that the CPU is not left idle; time-sharing is about many users working on one computer at the same moment.

5. Thinking real-time simply means fast. It means working within set time limits: a hard real-time system must meet every required deadline, while a soft one can tolerate the odd miss.

6. Treating Linux as one company's product, or as renamed Unix code. The Linux kernel is a fresh Unix-like kernel licensed under GPLv2, and many groups and firms build distributions around it.

7. Carrying Windows habits into Linux. There is no C: drive, and / (not a backslash) separates names; Report.txt and report.txt are two different files.

8. Reading rwxr-x--- as one block. Split it into three sets of three: owner, group, others.

9. Using rm carelessly. It normally deletes without asking, so add -i to be asked first; it leaves directories alone unless you add -r.

A routine for OS questions and a first Linux session

When a question names a program, a task or a system:

1. Place it in a layer: hardware, kernel, shell, device driver, utility program or application.

2. For a task, name the resource it uses: CPU time (process), memory, files, a device, security or the interface.

3. For a system, find the clue: several jobs in memory (multiprogramming), many users on one computer (time-sharing), timing deadlines (real-time), more than one CPU (multiprocessing), built into a device (embedded).

4. For a path, look at the start: / means Unix or Linux; a drive letter means Windows.

A first Linux session, as an ordinary user rather than root (the all-powerful superuser account), with each command typed as shown:

1. pwd to see where you are, then ls to see what is there.

2. mkdir practice, then cd practice to step inside.

3. echo Namaste > notes.txt to make a small file: echo writes the word to standard output, and > sends that output into notes.txt.

4. cat notes.txt writes the file's contents to standard output; in an ordinary terminal, Namaste appears on screen.

5. cp notes.txt copy.txt to copy the file, then mv copy.txt old.txt to rename the copy.

6. ls -l to read the permission characters, then chmod o-r notes.txt so that others cannot read it.

7. rm -i old.txt to delete the copy, answering the prompt with care.

Worked examples

  1. Name the type of operating system in each case. (a) In a loco workshop, a computer controls a machine tool and must answer every sensor signal within a fixed time. (b) In a divisional office, 40 clerks at terminals log in to one central computer and all work on it at the same time. (c) A mainframe keeps several jobs in memory, and when one job stops to wait for data from a disk, the CPU moves straight on to another job. (d) A server has four processors that run different programs at the same moment. (e) A home Wi-Fi router has a small OS built in, and its owner cannot install other programs on it.

    1. Step 1: In each case look for the clue: timing, number of users, jobs waiting for input or output, number of processors, or a system built into a device.
    2. Step 2: (a) A deadline that must be met every time marks a hard real-time system, the kind used in manufacturing.
    3. Step 3: (b) Many logged-in users working on one computer at the same time is time-sharing, so this is also a multi-user system.
    4. Step 4: (c) Keeping several jobs in memory so that the CPU is not left idle while one waits is multiprogramming.
    5. Step 5: (d) More than one processor means multiprocessing, a hardware feature rather than quick switching on one CPU. (e) An OS built into a device that does not take user-installed software is an embedded OS.

    Answer: (a) Hard real-time. (b) Time-sharing, multi-user. (c) Multiprogramming. (d) Multiprocessing. (e) Embedded.

  2. Ravi works on an office PC. Match each event with the OS function that handles it. (a) A new printer starts working only after its driver is installed. (b) A frozen program is closed while the other programs keep running. (c) With three programs open, each is given its own part of RAM and kept out of the others' parts. (d) Ravi saves a letter in his Documents folder. (e) Another user of the same PC cannot open Ravi's files. (f) Ravi starts a program by clicking its icon instead of typing a command.

    1. Step 1: For each event, ask which resource is involved: a device, a running program, memory, stored files, protection, or the way Ravi gives instructions.
    2. Step 2: (a) is device management through a driver. (b) is process management, because every running program is a process.
    3. Step 3: (c) is memory management, which decides which memory each program may use. (d) is file management, which keeps data as files in folders.
    4. Step 4: (e) is security: the OS checks who each user is and enforces file permissions. (f) is the user interface, here a GUI rather than a command line.

    Answer: (a) Device management. (b) Process management. (c) Memory management. (d) File management. (e) Security and user accounts. (f) User interface (GUI).

  3. On a Linux PC, Meena runs ls -l. The line for her script daily-report starts with -rwxr-x---, the owner is meena and the group is staff. Who may read, change or run the file, and which chmod number sets exactly these permissions?

    1. Step 1: The first character gives the type: - means a plain file (a d would mean a directory).
    2. Step 2: Split the next nine characters into sets of three: rwx for the owner, r-x for the group and --- for all others.
    3. Step 3: Meena may read, change and run the file; members of staff may read and run it but not change it; everyone else has no access.
    4. Step 4: For the number, add read (r) = 4, write (w) = 2 and execute (x) = 1 within each set: 4 + 2 + 1 = 7, 4 + 0 + 1 = 5 and 0 + 0 + 0 = 0, which gives 750.

    Answer: Owner meena: read, write and execute. Group staff: read and execute only. Others: no access. The number is 750, so chmod 750 daily-report sets the same permissions.

Practice checks

  1. Which of these is system software rather than application software?
  2. On a Linux computer, which statement correctly separates the kernel from the shell?
  3. A server has two processors, and each runs a different program at the same moment. Which term describes this?
  4. Which statement about Unix and Linux is correct?
  5. Ravi's file marks.txt shows -rw-r----- in ls -l. He wants all other users to be able to read it as well, and nothing else to change. Which command does this?

Sources checked