Overview of Operating Systems
Overview of Operating Systems
Operating system
An operating system or OS is a software program that enables the
computer hardware to communicate and operate with the computer software.
Without a computer operating system, a computer and software programs would be
useless. When computers were first introduced, the user interacted with them using
a command line interface, which required commands. Today, almost every
computer is using a GUI (Graphical User Interface) operating system that is much
easier to use and operate.
Tip: Some people may refer to an OS as "operating software." Although this is a
valid term, it is more appropriate to refer to this software as an "operating system."
Examples of computer operating systems
DOS
DOS (Disk Operating System) is an operating system that runs from a hard disk
drive. The term can also refer to a particular family of disk operating systems, most
commonly MS-DOS(Microsoft Disk Operating System).
Disk operating system is also used to describe several very similar command line
disk operating systems. PC-DOS (Personal Computer Disk Operating System) was
the first widely-installed disk operating system used in personal computers running
NRB LEVEL-4(IT) Shyam Gopal Timsina
These early operating systems did not multitask, as they were only able to run one
program at a time. The command line interface, in which a user has to type in
commands, required the user to remember commands to run programs or do other
operating system tasks, making it difficult for novices to use.
DOS commands
You can use the * and the ? wildcards to DIR /W displays the files/folders in
search for a particular file. The ? multiple rows. This view gives less
character represents ONE character, and information per file.
the * character represents multiple
characters. DIR *.JPG displays all files with the
extension JPG in the current directory
DIR *.* lists all the files in a directory. and all subdirectories.
Microsoft Windows
Windows is Microsoft's flagship operating system (OS), the de facto standard for
home and business computers. The graphical user interface (GUI)-based OS was
introduced in 1985 and has been released in many versions since then, as described
below. Microsoft got its start with the partnership of Bill Gates and Paul Allen in
NRB LEVEL-4(IT) Shyam Gopal Timsina
1975. Gates and Allen co-developed Xenix (a version of Unix) and also
collaborated on a BASIC interpreter for the Altair 8800. The company was
incorporated in 1981.
Microsoft gained prominence in the tech field with the release of MS-DOS, a text-
based command-line-driven operating system. DOS was mostly based on a
purchased intellectual property, QDOS. GUI-based operating systems of that time
included Xerox's Alto, released in 1979, and Apple's LISA and Macintosh systems,
which came later. Die-hard fans of MS-DOS referred to such systems as WIMPs,
which stood for "windows, icons, mouse and pull-down menus (or pointers)."
However, Gates saw the potential in GUI-based systems and started a project he
called Interface Manager. Gates thought he could bring the GUI to a wider
audience at a lower cost than the $9,000 LISA. The rest of Microsoft supported
this idea, and, in a somewhat ironic move, the project team selected "Windows" as
the name of the new operating system.
desktops and laptops -- with a steady rollout of new versions to support advances
in hardware.
Like many early versions of Microsoft's GUI operating systems, Windows 1.0 was
essentially a program that ran on top of DOS. Microsoft did not release the system
until two years after its first announcement, leading to suggestions that Windows
was vaporware. The release was a shaky start for the tech giant. Users found the
software unstable. However, the point-and-click interface made it easier for new
users to operate a computer. The user-friendly nature of Windows also drew
interest from customers who might have been intimidated by a command-line
interface. Windows 1.0 offered many of the common components found in today's
graphical user interface, such as scroll bars and "OK" buttons.
Windows 2.0 was faster, more stable and had more GUI features in common with
the Apple LISA. The system introduced the control panel and ran the first versions
of Excel and Word. Windows 2.0 supported extended memory, and Microsoft
updated it for compatibility with Intel's 80386 processor. It was during this time
that Microsoft became the largest software vendor in the world, just as computers
were becoming more commonplace. The fact that Windows systems were user-
friendly and relatively affordable was a contributing factor to the growing PC
market.
Microsoft optimized the Windows 3.0 operating system, which still ran on top of
DOS, for the 386 processor for a more responsive system. Windows 3.0 supported
NRB LEVEL-4(IT) Shyam Gopal Timsina
16 colors and included the casual games familiar to most Windows users: Solitaire,
Minesweeper and Hearts. Games that required more processing power still ran
directly on MS-DOS. Exiting to DOS gave games direct hardware access made
more system resources available that otherwise would have gone to Windows.
Microsoft offered Windows 3.1 as a paid sub-release in 1993. Windows 3.1
features included support for TrueType fonts and peer-to-peer networking.
1993: Windows NT
Windows NT's release marked the completion of a side project to build a new,
advanced OS. NT was 32-bit and had a hardware abstraction layer. DOS was
available through the command prompt, but it did not run the Windows OS.
Microsoft designed NT as a workstation OS for businesses rather than home users.
The system introduced the Start button.
1995: Windows 95
1998: Windows 98
Microsoft improved speed and Plug and Play hardware support in Windows 98.
The company also debuted USB support and the Quick Launch bar in this release.
DOS gaming began to wane as Windows gaming technology improved. The
popularity of the OS made it an attractive target for malware. Microsoft integrated
web technology into the Windows user interface and built its own
NRB LEVEL-4(IT) Shyam Gopal Timsina
web browser into the desktop. This feature was one of the defining issues in the
U.S. Justice Department's antitrust suit against Microsoft in the 1990s.
2000: Windows ME
Windows ME (Millennium Edition) was the last use of the Windows 95 codebase.
Its most notable new feature was System Restore. Many customers found this
release to be unstable, and it was acknowledged as a poor release by Steve Ballmer
and Microsoft. Some critics said ME stood for "mistake edition."
Microsoft released the professional desktop OS Windows 2000 the same year.
Microsoft based this OS on the more stable Windows NT code. Some home users
installed Windows 2000 for its greater reliability. Microsoft updated Plug and Play
support, which spurred home users to switch to this OS.
2001: Windows XP
Microsoft hyped Windows Vista after the company spent a lot of resources to
develop a more polished appearance. Vista had interesting visual effects but the OS
NRB LEVEL-4(IT) Shyam Gopal Timsina
was slow to start and run. The 32-bit version, in particular, didn't enable
enough RAM for the memory-hungry OS to operate properly.
Microsoft tightened licensing rights and made it more work to activate Windows.
The company also peeled back user control of the operating system's internal
workings.
Microsoft lost market share to Apple and Linux variants. Vista's flaws -- coupled
with the fact that many older computers lacked the resources to run the system --
led to many home and business users staying with XP.
2009: Windows 7
With true 64-bit support and more Direct X features, Windows 7 proved to be a
popular release for Windows users.
2012: Windows 8
2015: Windows 10
UNIX
UNIX systems also have a graphical user interface (GUI) similar to Microsoft
Windows which provides an easy to use environment. However, knowledge of
UNIX is required for operations which aren't covered by a graphical program,
or for when there is no windows interface available, for example, in a telnet
session.
The installation process for a Unix operating system typically involves the
following steps:
o Boot from Installation Media: Insert the installation media into your
computer and restart it. You may need to change the boot order in the
BIOS/UEFI settings to prioritize booting from the installation media.
NRB LEVEL-4(IT) Shyam Gopal Timsina
➢ Start Installation: Once the computer boots from the installation media,
you'll be prompted to begin the installation process. This may involve
selecting installation options such as language, keyboard layout, and disk
partitioning.
➢ Disk Partitioning: You'll need to partition your hard drive to allocate space
for the Unix operating system. You may choose to create separate partitions
for the root filesystem (/), swap space, and possibly other filesystems.
Linux installation
Choose a Linux Distribution: Decide which Linux distribution you want to install.
Popular options include Ubuntu, Fedora, Debian, CentOS, and Linux Mint. Each
distribution has its own strengths and target audience, so choose one that best suits
your needs.
Download the ISO Image: Go to the official website of your chosen Linux
distribution and download the ISO image file for the version you want to install.
Make sure to download the appropriate version for your computer architecture
(e.g., 64-bit or 32-bit).
Create Installation Media: Use the downloaded ISO image to create a bootable
installation media. You can burn it to a DVD or create a bootable USB drive using
tools like Rufus (for Windows) or Etcher (for Windows, macOS, and Linux).
NRB LEVEL-4(IT) Shyam Gopal Timsina
Boot from Installation Media: Insert the installation media into your computer and
restart it. You may need to change the boot order in the BIOS/UEFI settings to
prioritize booting from the installation media.
Start Installation: Once your computer boots from the installation media, you'll be
presented with the option to install Linux. Follow the on-screen instructions to
begin the installation process.
Partitioning: You'll need to partition your hard drive to allocate space for the Linux
installation. Most Linux distributions provide options for automatic partitioning or
manual partitioning. If you're unsure, you can usually choose the automatic option.
File system Formatting: Format the partitions you created with appropriate
filesystem types. Common choices include ext4 for the root partition (/) and swap
space for virtual memory.
Boot Loader Installation: Install the GRUB (GRand Unified Bootloader) or another
bootloader to the Master Boot Record (MBR) or EFI System Partition (ESP) to
enable booting into Linux.
Finalization: Complete the installation process and remove the installation media
from the computer. Reboot the system to start using Linux.
Unix Back up
To back up a Unix operating system, you can use various tools and methods.
Here's a general approach:
Tape drives.
tar: Unix utility for creating tape archives, commonly used for file-level backups.
rsync: Efficient file-copying tool that can be used for incremental backups.
Identify the cause of the issue, whether it's hardware failure, software corruption,
or other factors.
Use a recovery disk or enter single-user mode to access the system for recovery.
If backups are available, follow the procedure to restore critical files, directories,
and configurations.
Depending on the backup method used, this may involve file-level restores, disk
imaging, or other techniques.
If the system fails to boot after recovery, repair or reinstall the bootloader (e.g.,
GRUB, LILO) to restore the boot process.
Check that all critical data and configurations are restored correctly.
Apply any updates or patches that were released after the backup was created to
ensure the system is up-to-date and secure.
Document the recovery process, including the steps taken, any issues encountered,
and their resolutions.
Use this documentation for future reference and to improve recovery procedures.
Identify the root cause of the issue and take steps to prevent similar incidents in the
future.
Regularly monitor the health and performance of the Unix system to detect and
address any potential issues early.
Regularly test backup and recovery procedures to ensure they're effective and up-
to-date.
Practice disaster recovery drills to simulate real-world scenarios and validate the
system's resilience.
NRB LEVEL-4(IT) Shyam Gopal Timsina
Linux Recovery
Most Linux distributions provide a recovery mode option in the bootloader menu.
Selecting this option will boot the system into a minimal environment with
essential services enabled.
Alternatively, you can access single-user mode, also known as rescue mode, to
troubleshoot and repair the system. This mode provides a root shell prompt for
manual intervention.
If the system cannot boot normally or into recovery mode, booting from a Live
CD/USB allows you to access the filesystem and repair the system from an
external environment.
Use filesystem checking tools like fsck to repair any inconsistencies or errors in the
filesystem. Run fsck on the affected partitions to fix issues.
fsck /dev/sdXY
If you have backups, restore critical files, directories, and configurations from
them. Depending on the backup method used, this may involve file-level restores,
disk imaging, or other techniques.
6. Repair Bootloader:
Reinstall or repair the bootloader (e.g., GRUB or LILO) if the system fails to boot
after recovery. Use tools specific to your distribution for bootloader repair.
Review system logs (/var/log) to identify the root cause of the issue and any error
messages that may provide clues for troubleshooting.
9. Update System:
Linux Backup
Backing up a Linux system is essential to protect against data loss, system failures,
and other disasters. Here's a guide to performing backups in Linux:
Tape drives.
NRB LEVEL-4(IT) Shyam Gopal Timsina
tar: Unix utility for creating tape archives, commonly used for file-level backups.
Regular backups minimize data loss and ensure up-to-date copies of critical data.
Backup Examples:
Regularly verify the integrity of backups to ensure they can be restored when
needed.
Document the backup process, including schedules, commands used, and locations
of backups.
NRB LEVEL-4(IT) Shyam Gopal Timsina
MS DOS
Obtain an MS-DOS installation disk or create a bootable USB drive with MS-DOS
files.
Insert the MS-DOS installation disk or USB drive into the computer.
Restart the computer and boot from the installation media. You may need to
change the boot order in the BIOS or UEFI settings.
Once the system boots from the installation media, you'll be prompted to begin the
installation process.
Follow the prompts to partition and format the hard drive. You can use the fdisk
command to create partitions and the format command to format them.
fdisk
NRB LEVEL-4(IT) Shyam Gopal Timsina
format C:
After formatting the hard drive, MS-DOS will copy essential system files to the
disk.
MS-DOS may prompt you to configure system settings such as date, time,
keyboard layout, and language during the installation process.
If needed, you can install additional device drivers or utilities after the basic
installation is complete.
8. Complete Installation:
9. Test Installation:
After rebooting, ensure that MS-DOS boots properly and that you can access the
command prompt.
Install any additional applications or programs you need to use with MS-DOS.
NRB LEVEL-4(IT) Shyam Gopal Timsina
Notes:
Be cautious during the installation process, as formatting the wrong drive can
result in data loss.
Ensure that any hardware devices you plan to use with MS-DOS are compatible
and have appropriate drivers available.
Backup in DOS
Floppy disks: Commonly used for small backups due to limited capacity.
External hard drives: Provide larger storage capacity for larger backups.
Tape drives: Less common for personal use but offer high capacity for larger
backups.
NRB LEVEL-4(IT) Shyam Gopal Timsina
3. Copy Files:
Use the COPY command to copy files and directories from the source to the
backup medium.
This command copies all files from the source directory on drive C to a floppy disk
in drive A.
4. Organize Backup:
Label backup media with the date and contents for easy identification.
6. Test Backups:
Periodically verify the integrity of backups by restoring files from the backup
medium.
Ensure that backed-up files are accessible and can be successfully restored.
Determine the reason for data loss, whether it's accidental deletion, disk corruption,
or another issue.
NRB LEVEL-4(IT) Shyam Gopal Timsina
If backups are available, proceed with restoring files from the backup copies.
Use the COPY command to copy files from the backup medium to the original
location on the disk.
Replace A:\BACKUP\*.* with the path to the backup files and C:\ with the
destination directory on the disk.
If the data loss is due to disk errors or corruption, consider using disk recovery
tools specifically designed for MS-DOS.
Tools like Norton Disk Doctor or CHKDSK (Check Disk) can be used to scan and
repair disk errors.
dos
CHKDSK C: /F
If files are deleted or lost due to accidental deletion, use data recovery software
capable of recovering files from formatted or corrupted disks.
These tools typically scan the disk for lost files and allow you to recover them to a
different location.
Document the recovery process, including the steps taken and any issues
encountered.
NRB LEVEL-4(IT) Shyam Gopal Timsina
This documentation can be useful for future reference and improving recovery
procedures.
After recovering the data, implement preventive measures such as regular backups,
disk maintenance, and data integrity checks to minimize the risk of future data loss.
A computer file is defined as a medium used for saving and managing data in the
computer system. The data stored in the computer system is completely in digital
format, although there can be various types of files that help us to store the data.
A file system is a method an operating system uses to store, organize, and manage
files and directories on a storage device. Some common types of file systems
include:
FAT (File Allocation Table): An older file system used by older versions of
Windows and other operating systems.
NTFS (New Technology File System): A modern file system used by Windows. It
supports features such as file and folder permissions, compression, and encryption.
ext (Extended File System): A file system commonly used on Linux and Unix-
based operating systems.
APFS (Apple File System): A new file system introduced by Apple for their Macs
and iOS devices.
The name of the file is divided into two parts as shown below:
name
We’ve seen a variety of data structures where the file could be kept. The file
system’s job is to keep the files organized in the best way possible.
A free space is created on the hard drive whenever a file is deleted from it. To
reallocate them to other files, many of these spaces may need to be recovered.
Choosing where to store the files on the hard disc is the main issue with files one
block may or may not be used to store a file. It may be kept in the disk’s non-
contiguous blocks. We must keep track of all the blocks where the files are
partially located.
File Directories
The collection of files is a file directory. The directory contains information about
the files, including attributes, location, and ownership. Much of this information,
especially that is concerned with storage, is managed by the operating system. The
directory is itself a file, accessible by various file management routines.
• Create a file
• Delete a file
• List a directory
• Rename a file
• Naming: It becomes convenient for users as two users can have same name
for different files or may have different name for same file.
• Grouping: Logical grouping of files can be done by properties e.g. all java
programs, all games etc.
Single-Level Directory
• Naming problem: Users cannot have the same name for two files.
Single-Level Directory
Naming problem: Users cannot have the same name for two files.
NRB LEVEL-4(IT) Shyam Gopal Timsina
Two-Level Directory
Path name: Due to two levels there is a path name for every file to locate that file.
Now, we can have the same file name for different users.
Tree-Structured Directory
The directory is maintained in the form of a tree. Searching is efficient and also
there is grouping capability. We have absolute or relative path name for a file.
There are several types of file allocation methods. These are mentioned below.
➢ Continuous Allocation
➢ Linked Allocation(Non-contiguous allocation)
➢ Indexed Allocation
Continuous Allocation
A single continuous set of blocks is allocated to a file at the time of file creation.
Thus, this is a pre-allocation strategy, using variable size portions. The file
allocation table needs just a single entry for each file, showing the starting block
NRB LEVEL-4(IT) Shyam Gopal Timsina
and the length of the file. This method is best from the point of view of the
individual sequential file. Multiple blocks can be read in at a time to improve I/O
performance for sequential processing. It is also easy to retrieve a single block. For
example, if a file starts at block b, and the ith block of the file is wanted, its
location on secondary storage is simply b+i-1.
Also, with pre-allocation, it is necessary to declare the size of the file at the time of
creation.
Allocation is on an individual block basis. Each block contains a pointer to the next
block in the chain. Again the file table needs just a single entry for each file,
showing the starting block and the length of the file. Although pre-allocation is
possible, it is more common simply to allocate blocks as needed. Any free block
can be added to the chain. The blocks need not be continuous. An increase in file
size is always possible if a free disk block is available. There is no external
fragmentation because only one block at a time is needed but there can be internal
fragmentation but it exists only in the last disk block of the file.
If the pointer of any disk block is lost, the file will be truncated.
Indexed Allocation
MS-DOS Operating System also called the Disk Operating system was Developed
by Microsoft for x86 personal computers. It works on the phenomenon of doing
less and getting more. It is a 16-bit operating system. A closed-source model was
initially released on August 12, 1981, and the final release on September 14, 2000.
Still usable for simple tasks like word processing and playing games.
NRB LEVEL-4(IT) Shyam Gopal Timsina
The mouse cannot be used to give inputs instead it uses basic system commands to
perform the task.
Files on the system can be easily deleted or the system can also be easily
destroyed.
It does not provide any warning message before you delete or perform any
unwanted task like in windows or Linux.
1. Internal Commands
Internal commands are those commands that are loaded automatically in the
memory when DOS is loaded into memory during the booting process. These
commands are easier to learn and use. They require no external files for their
storage as in the case of external commands. These are for performing a basic
operation on files and in directories. They do not need any external file support.
These commands are used for common jobs such as copying and erasing files.
2. External Commands
These external commands are for performing advanced tasks and they do not need
some external file support as they are not stored in COMMAND.com. The external
commands are used less frequently and are stored in some external files which are
stored in some secondary storage devices. Whenever an external command is to be
executed then the external file in which that particular command is stored is
transferred from the secondary storage disk to the main memory(RAM).
IO. SYS: A hidden executable binary file that processes instructions that tell the
operating system (OS) how the computer is set up when it is booted or started. It
contains the default MS-DOS device drivers (hardware interfacing routines) and
the DOS initialization program.
MSDOS. SYS: The MSDOS.SYS file is a hidden, system, read-only file created on
the root of the boot drive. There are several configurations that can be changed
using this file. Most values in the MSDOS.SYS are either 0 or 1, which is off or
on.
NRB LEVEL-4(IT) Shyam Gopal Timsina
There are various types of Operating Systems used throughout the world and this
depends mainly on the type of operations performed. These Operating Systems are
manufactured by large multinational companies like Microsoft, Apple, etc. Let’s
look at the few most commonly used OS in the real world:
➢ Windows
➢ UNIX
➢ LINUX
Windows
Advantages of Windows
NRB LEVEL-4(IT) Shyam Gopal Timsina
Pre-loaded and available Software: Windows comes with much more user-friendly
software to make everyday task easier and if the software is not available then one
can easily get it from the Internet and run it.
Ease of Use: Microsoft Windows has developed by far the most user-friendly OS
in the market, keeping in mind that it serves the purpose of most types of markets
in the world. It’s the most preferred OS for personal computers.
Game Runner: Windows supports a plethora of games manufactured till date and
comes with all the supporting base software to drive the game engine. So it’s the
most popular OS among the game lovers.
Disadvantages of Windows
Expensive: Microsoft is a closed-source OS and the license cost is really high. It’s
not possible for every class of society to buy a new license every time one is
expired.
Not reliable: Windows starts to lag with time and eventually needs booting every
time and now to get back the initial speed.
UNIX
Developed in 1970 in the Bell Lab research center UNIX became a multitasking
and multiuser operating system, reaching numerous platforms for use. It was
NRB LEVEL-4(IT) Shyam Gopal Timsina
developed by Ken Thompson, Dennis Ritchie, and a few others and later AT&T
licensed UNIX to the development of many variants of Unix, serving academic and
business purposes at the University of California, Berkley Software Distribution,
IBM, Microsoft, and Sun Microsystem.
Multiuser support: UNIX allows multiple users to simultaneously access the same
system and share resources.
Shell scripting: UNIX provides a powerful scripting language that allows users to
automate tasks.
Security: UNIX has a robust security model that includes file permissions, user
accounts, and network security features.
Portability: UNIX can run on a wide variety of hardware platforms, from small
embedded systems to large mainframe computers.
NRB LEVEL-4(IT) Shyam Gopal Timsina
Layer-2: Kernel: It interacts with hardware and most of the tasks like memory
management, task scheduling, and management are done by the kernel.
Layer-3: Shell commands: Shell is the utility that processes your requests. When
you type in a command at the terminal, the shell interprets the command and calls
the program that you want. There are various commands like cp, mv, cat, grep, id,
wc, nroff, a.out and more.
Layer-4: Application Layer: It is the outermost layer that executes the given
external applications.
NRB LEVEL-4(IT) Shyam Gopal Timsina
Advantages of UNIX
The OS is available on a wide variety of machines that are the most truly portable
operating system.
It has a Very efficient virtual memory system, which allows many programs to run
simultaneously with a modest amount of physical memory and time.
The OS was primarily built to serve the complete multitasking purpose without
crashing of data, and it served well along with the protected memory.
Disadvantages of UNIX
This OS was primarily designed for programmers and techies and not for personal
and casual use.
To work comfortably with the UNIX system, one needs to understand the main
design features and how to command and interact with the OS.
Linux
Primarily derived from the concept of Unix, Linux became the most-prominent
free and open-source OS available to everyone in the world. It is built around the
Linux kernel and served for both desktop and server use. Linux was originally
NRB LEVEL-4(IT) Shyam Gopal Timsina
developed for personal computers based on the Intel x86 architecture but since
then it was ported to more platforms than any other operating system.
Linux has the largest installed base of all general-purpose operating systems. It is
also the leading operating system on servers and other big iron systems such as
mainframe computers, and the only OS used on TOP500 Supercomputers. The top
Linux OS are Ubuntu, Fedora, OpenSUSE, RedHat, and many more.
Linux Distribution
➢ MX Linux
➢ Manjaro
➢ Linux Mint
➢ elementary
➢ Ubuntu
➢ Debian
➢ Solus
➢ Fedora
➢ openSUSE
➢ Deepin
Advantages of LINUX
The OS is open-source and available free of cost to every computer user. There are
large repositories from which anyone can freely download high-quality software
for almost any task.
Linux provides high performance for a longer time and does not require a periodic
reboot to maintain the system.
It is one of the most secure OS and does not permit any unwanted malware and
virus into the system.
It is designed to multitask and can perform multiple processes at the same time,
without hampering the performance of the OS.
The OS is highly compatible and flexible to run on all modern PCs and networks.
Disadvantages of LINUX
NRB LEVEL-4(IT) Shyam Gopal Timsina
It is not as user-friendly as Windows and users need to struggle for a few days
before adapting to the behavior of OS.
It is not meant for gamers since it does not support any high graphics game.
Since there are no standard editions available for Linux, it comes with many
versions, confusing the users about what to adapt and what not.