0% found this document useful (0 votes)
71 views28 pages

Unit 1

The document provides an overview of operating systems and their key components and functions. It discusses how operating systems act as an interface between hardware and application software, and how their main purposes are to provide an environment for running programs and manage computer resources like processors, storage, and data. It then describes the main components of operating systems, including process management, I/O device management, file management, memory management, and security management.

Uploaded by

Girish Khedikar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views28 pages

Unit 1

The document provides an overview of operating systems and their key components and functions. It discusses how operating systems act as an interface between hardware and application software, and how their main purposes are to provide an environment for running programs and manage computer resources like processors, storage, and data. It then describes the main components of operating systems, including process management, I/O device management, file management, memory management, and security management.

Uploaded by

Girish Khedikar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

Overview of Operating System

Computer software can be divided into two main categories: application software and system software.
Application software consists of the programs for performing tasks particular to the machine’s utilization. This software is
designed to solve a particular problem for users. Examples of application software include spreadsheets, database
systems, desktop publishing systems, program development software, and games.
On the other hand, system software is more transparent and less noticed by the typical computer user. This software
provides a general programming environment in which programmers can create specific applications to suit their needs.
This environment provides new functions that are not available at the hardware level and performs tasks related to
executing the application program. System software acts as an interface between the hardware of the computer and the
application software that users need to run on the computer. The most important type of system software is the
operating system.
An Operating System (OS) is a collection of programs that acts as an interface between a user of a computer and the
computer hardware. The purpose of an operating system is to provide an environment in which a user may execute the
programs. Operating Systems are viewed as resource managers. The main resource is the computer hardware in the form
of processors, storage, input/output devices, communication devices, and data. Some of the operating system functions
are: implementing the user interface, sharing hardware among users, allowing users to share data among themselves,
preventing users from interfering with one another, scheduling resources among users, facilitating input/output,
recovering from errors, accounting for resource usage, facilitating parallel operations, organizing data for secure and
rapid access, and handling network communications
What Operating Systems Do
We begin our discussion by looking at the operating system’s role in the overall computer system. A computer system can
be divided roughly into four components: the hardware, the operating system, the application programs, and the users
(Figure 1.1)

The hardware—the central processing unit (CPU), the memory, and the input/output (I/O) devices—provides the basic
computing resources for the system. The application programs—such as word processors, spreadsheets, compilers,
and Web browsers—define the ways in which these resources are used to solve users’ computing problems. The
operating system controls the hardware and coordinates its use among the various application programs for the
various users.
Components of Operating System
There are various components of an Operating System to perform well defined tasks. Though most of the Operating
Systems differ in structure but logically they have similar components. Each component must be a well-defined portion of
a system that appropriately describes the functions, inputs, and outputs.
There are following 8-components of an Operating System:
1. Process Management
2. I/O Device Management
3. File Management
4. Network Management
5. Main Memory Management
6. Secondary Storage Management
7. Security Management
8. Command Interpreter System
1. Process Management
A process is program or a fraction of a program that is loaded in main memory. A process needs certain resources including CPU time,
Memory, Files, and I/O devices to accomplish its task. The process management component manages the multiple processes running
simultaneously on the Operating System.
A program in running state is called a process.
The operating system is responsible for the following activities in connection with process management:
• Create, load, execute, suspend, resume, and terminate processes.
• Switch system among multiple processes in main memory.
• Provides communication mechanisms so that processes can communicate with each others
• Provides synchronization mechanisms to control concurrent access to shared data to keep shared data consistent.
• Allocate/de-allocate resources properly to prevent or avoid deadlock situation.
Components of Operating System - cont…
2. I/O Device Management
One of the purposes of an operating system is to hide the peculiarities of specific hardware devices from the user. I/O
Device Management provides an abstract level of H/W devices and keep the details from applications to ensure proper
use of devices, to prevent errors, and to provide users with convenient and efficient programming environment.
Following are the tasks of I/O Device Management component:
• Hide the details of H/W devices
• Manage main memory for the devices using cache, buffer, and spooling
• Maintain and provide custom drivers for each device.
3. File Management
File management is one of the most visible services of an operating system. Computers can store information in several different physical forms;
magnetic tape, disk, and drum are the most common forms.
A file is defined as a set of correlated information and it is defined by the creator of the file. Mostly files represent data, source and object forms,
and programs.
Data files can be of any type like alphabetic, numeric, and alphanumeric.
A files is a sequence of bits, bytes, lines or records whose meaning is defined by its creator and user.
The operating system implements the abstract concept of the file by managing mass storage device, such as types and disks.
Also files are normally organized into directories to ease their use. These directories may contain files and other directories and so on.
The operating system is responsible for the following activities in connection with file management:
•File creation and deletion
•Directory creation and deletion
•The support of primitives for manipulating files and directories
•Mapping files onto secondary storage
•File backup on stable (nonvolatile) storage media
Components of Operating System - cont…
4. Network Management
The definition of network management is often broad, as network management involves several different components. Network management is the process of
managing and administering a computer network. A computer network is a collection of various types of computers connected with each other.
Network management comprises fault analysis, maintaining the quality of service, provisioning of networks, and performance management.
Network management is the process of keeping your network healthy for an efficient communication between different computers
Following are the features of network management:
•Network administration
•Network maintenance
•Network operation
•Network provisioning
•Network security

5. Main Memory Management


Memory is a large array of words or bytes, each with its own address. It is a repository of quickly accessible data shared by the CPU and I/O devices.
Main memory is a volatile storage device which means it loses its contents in the case of system failure or as soon as system power goes down.
The main motivation behind Memory Management is to maximize memory utilization on the computer system.
The operating system is responsible for the following activities in connections with memory management:
•Keep track of which parts of memory are currently being used and by whom.
•Decide which processes to load when memory space becomes available.
•Allocate and deallocate memory space as needed.
6. Secondary Storage Management
The main purpose of a computer system is to execute programs. These programs, together with the data they access, must be in main memory during execution.
Since the main memory is too small to permanently accommodate all data and program, the computer system must provide secondary storage to backup main
memory.
Most modern computer systems use disks as the principle on-line storage medium, for both programs and data. Most programs, like compilers, assemblers, sort
routines, editors, formatters, and so on, are stored on the disk until loaded into memory, and then use the disk as both the source and destination of their processing.
The operating system is responsible for the following activities in connection with disk management:
• Free space management
• Storage allocation
• Disk scheduling
Components of Operating System - cont…

7. Security Management
The operating system is primarily responsible for all task and activities happen in the computer system. The various processes in an operating system
must be protected from each other’s activities. For that purpose, various mechanisms which can be used to ensure that the files, memory segment,
CPU and other resources can be operated on only by those processes that have gained proper authorization from the operating system.
Security Management refers to a mechanism for controlling the access of programs, processes, or users to the resources defined by a computer controls to be imposed,
together with some means of enforcement.
For example, memory addressing hardware ensure that a process can only execute within its own address space. The timer ensure that no process
can gain control of the CPU without relinquishing it. Finally, no process is allowed to do it’s own I/O, to protect the integrity of the various peripheral devices.

8. Command Interpreter System


One of the most important component of an operating system is its command interpreter. The command interpreter is the primary interface between the
user and the rest of the system.
Command Interpreter System executes a user command by calling one or more number of underlying system programs or system calls.
Command Interpreter System allows human users to interact with the Operating System and provides convenient programming environment to the
users.
Many commands are given to the operating system by control statements. A program which reads and interprets control statements is
automatically executed. This program is called the shell and few examples are Windows DOS command window, Bash of Unix/Linux or C-Shell
of Unix/Linux.
Viewpoints of the Operating System
There are mainly two types of views of the operating system.
• User view
• System view
User view − The user viewpoint focuses on how the user interacts with the operating system through the usage of various
application programs. Some systems are designed for a single user to monopolize the resources to maximize the user’s task.
Therefore the Operating system is designed primarily for ease of use with little emphasis on quality and none of resource
utilization.
Single user view point
These systems are much more designed for a single user experience and meet the needs of single user where the
performance is not given focus as the multiple user systems. Most computer users use a monitor,keyboard,printer,mouse
and other accessories to operate their computer system. In some cases the system is designed to maximize the output of a
single user. As a result more attention is laid on accessibility, and resource allocation is less important.
Multiple user view point
These systems are designed for multiple user experience and meet the needs of multiple user. when there is one mainframe
computer and many users on their computer trying to interact with their kernels over the mainframe to each other.
The client server architecture is a good example where many clients may interact through a remote server, and the same
constraints of effective use of server resources may arise.
Handled user view point
In the handled user viewpoint smartphones interact via wireless devices to perform numerous operations but they are not as
efficient as a computer interface, limiting their usefulness. Smart phones have given you the best handheld technology ever.
However their operating system is a great example of creating a device focused on the user’s point of view. The Touchscreen
era has given you the best handheld technology ever.
Viewpoints of the Operating System – cont…
Embedded System user view Point
The embedded system lacks a user point of view. The remote control used to turn on or off the tv is all part of an embedded system in which
the electronic device communicates with another program where the user view point is limited and allows the user to engage with the
application.
System view − An operating system can also be considered as a program running at all times in the background of a computer system known
as the kernel and handling all the application programs. The operating system may also be viewed as just a resource allocator. A computer
system comprises various sources, such as hardware and software which must be managed effectively. The operating system is responsible
for managing hardware resources and allocating them to programs and users to ensure maximum performance. In the system viewpoint the
operating system is more involved with hardware services -CPU time, memory space, I/O operation , and so on.
From the system point of view, we are more focused on how the hardware has to interact with the operating system than the user. The
hardware and the operating system interact with each other for the various purpose some of them are
Resource Allocation
There are many resources which present in the hardware such as register, cache, RAM,ROM, processors, I/O interaction, etc. These resources
demanded by the operating system when it is asked by any application program. This resource allocation has to be done only by the
operating system which has used many techniques and strategies such that it brings the most out of its processing and memory space. There
are various techniques such as paging, virtual memory, caching,etc.
The operating system allocates resources when a program needs them. When the program terminates, the resources are unallocated and
allocated to other programs that need them.
There are two resource allocation techniques −
Resource partitioning approach − It divides the resources in the system to many resource partitions, where each partition may include
various resources -for example ,1MB memory, disk blocks and a printer. Then it allocates one resource partition to each user program before
the program's initiation. A resource table records the resource partition and its current allocation status.
In this approach the operating system decides beforehand what resources should be allocated to which user program.
Pool based approach −In the pool based approach there is a common pool of resources. The operating system checks the allocation status in
the resource table whenever a program makes a request for a resource. If the resource is free, it allocates the resources to the program.
Viewpoints of the Operating System – cont…
Embedded System user view Point
The embedded system lacks a user point of view. The remote control used to turn on or off the tv is all part of an embedded system in which the
electronic device communicates with another program where the user view point is limited and allows the user to engage with the application.
System view − An operating system can also be considered as a program running at all times in the background of a computer system known as the
kernel and handling all the application programs. The operating system may also be viewed as just a resource allocator. A computer system comprises
various sources, such as hardware and software which must be managed effectively. The operating system is responsible for managing hardware
resources and allocating them to programs and users to ensure maximum performance. In the system viewpoint the operating system is more
involved with hardware services -CPU time, memory space, I/O operation , and so on.
From the system point of view, we are more focused on how the hardware has to interact with the operating system than the user. The hardware and
the operating system interact with each other for the various purpose some of them are
Resource Allocation
There are many resources which present in the hardware such as register, cache, RAM,ROM, processors, I/O interaction, etc. These resources
demanded by the operating system when it is asked by any application program. This resource allocation has to be done only by the operating system
which has used many techniques and strategies such that it brings the most out of its processing and memory space. There are various techniques
such as paging, virtual memory, caching, etc.
The operating system allocates resources when a program needs them. When the program terminates, the resources are unallocated and allocated to
other programs that need them.
There are two resource allocation techniques −
Resource partitioning approach − It divides the resources in the system to many resource partitions, where each partition may include various
resources -for example ,1MB memory, disk blocks and a printer. Then it allocates one resource partition to each user program before the program's
initiation. A resource table records the resource partition and its current allocation status.
In this approach the operating system decides beforehand what resources should be allocated to which user program.
Pool based approach −In the pool based approach there is a common pool of resources. The operating system checks the allocation status in the
resource table whenever a program makes a request for a resource. If the resource is free, it allocates the resources to the program.
Control program
In the control programs it controls how input and output devices (hardware) interact with the operating system. The user may request an action that
can only be done with I/O devices, The operating system must also have proper communication, control, detect, and handle such devices.
Operating System Structure
Simple Structure
There are many operating systems that have a rather simple structure. These started as small systems and rapidly expanded
much further than their scope. A common example of this is MS-DOS. It was designed simply for a niche amount for people.
There was no indication that it would become so popular.
An image to illustrate the structure of MS-DOS is as follows −
Operating System Structure
Layered Structure
One way to achieve modularity in the operating system is the layered approach. In this, the bottom layer is the hardware and
the topmost layer is the user interface.
An image demonstrating the layered approach is as follows −
Types of operating systems
1. Batch OS
The batch operating system does not have a direct link with the computer. A different system divides and allocates similar
tasks into batches for easy processing and faster response.
The batch operating system is appropriate for lengthy and time-consuming tasks. To avoid slowing down a device, each user
prepares their tasks offline and submits them to an operator. The advantages and disadvantages of using a batch operating
system include:
Advantages Disadvantages
Many users can share batch systems. There is little Some notable disadvantages are: Batch operating
idle time for batch operating systems. systems are challenging to debug.
It becomes possible to manage large workloads. Any failure of the system creates a backlog.
It's easy to estimate how long a task will take to be It may be costly to install and maintain good batch
completed. operating systems.

Batch operating systems are used for tasks such as managing payroll systems, data entry and bank
statements.
2. Time-sharing or multitasking OS
The time-sharing operating system, also known as a multitasking OS, works by allocating time to a
particular task and switching between tasks frequently. Unlike the batch system, the time-sharing system
allows users to complete their work in the system simultaneously.
It allows many users to be distributed across various terminals to minimize response time. Potential
advantages and disadvantages of time-sharing operating systems include:
Types of operating systems – cont…
Advantages Disadvantages
There's a quick response during task performance. The user's data security might be a problem.
It minimizes the idle time of the processor. System failure can lead to widespread failures.
All tasks get an equal chance of being accomplished. Problems in data communication may arise.
It reduces the chance of software duplication. The integrity of user programs is not assured.

Examples of time-sharing operating systems include Multics and Unix


3. Distributed OS
This system is based on autonomous but interconnected computers communicating with each other via communication
lines or a shared network. Each autonomous system has its own processor that may differ in size and function.
A distributed operating system serves multiple applications and multiple users in real time. The data processing function is
then distributed across the processors. Potential advantages and disadvantages of distributed operating systems are:
Advantages Disadvantages
They allow remote working. If the primary network fails, the entire system shuts down.
They allow a faster exchange of data among users. They're expensive to install.
Failure in one site may not cause much disruption to the
They require a high level of expertise to maintain.
system.
They reduce delays in data processing.
They minimize the load on the host computer.
They enhance scalability since more systems can be added
to the network.
Distributed operating systems are used for tasks such as telecommunication networks, airline reservation controls and peer-to-peer
Types of operating systems – cont…
4. Network OS
Network operating systems are installed on a server providing users with the capability to manage data, user groups and
applications. This operating system enables users to access and share files and devices such as printers, security software
and other applications, mostly in a local area network. Potential advantages and disadvantages of network operating
systems are:
Advantages Disadvantages
Centralized servers provide high stability. They require regular updates and maintenance.
Security issues are easier to handle through the
Servers are expensive to buy and maintain.
servers.
Users' reliance on a central server might be
It's easy to upgrade and integrate new technologies.
detrimental to workflows.
Remote access to the servers is possible.
Examples of network operating systems include Microsoft Windows, Linux and macOS X .
5. Real-time OS
Real-time operating systems provide support to real-time systems that require observance of strict time
requirements. The response time between input, processing and response is tiny, which is beneficial for
processes that are highly sensitive and need high precision.
These processes include operating missile systems, medical systems or air traffic control systems, where
delays may lead to loss of life and property. Real-time operating systems may either be hard real-time
systems or soft real-time systems. Hard real-time systems are installed in applications with strict time
constraints.
The system guarantees the completion of sensitive tasks on time. Hard real-time does not have virtual
memory. Soft real-time systems do not have equally rigid time requirements. A critical task gets priority
Types of operating systems – cont…
Advantages Disadvantages
They use device and systems maximally, hence more output. They have a low capacity to run tasks simultaneously.
They allow fast shifting from one task to another. They use heavy system resources.
The focus is on current tasks, and less focus is put on the They run on complex algorithms that are not easy to
queue. understand.
They're unsuitable for thread priority because of the
They can be used in embedded systems.
system's inability to switch tasks.
Real-time systems are meticulously programmed, hence free
of errors.
They allow easy allocation of memory.
Real-time operating systems are used for tasks such as scientific experiments, medical imaging, robotics and air traffic control
operations.
6. Mobile OS
Mobile operating systems run exclusively on small devices such as smartphones, tablets and wearables. The
system combines the features of a personal computer with additional features useful for a handheld device.
Mobile operating systems start when a device is powered on to provide access to installed applications. Mobile
operating systems also manage wireless network connectivity. Potential advantages and disadvantages of mobile
operating systems are:
Advantages Disadvantages
Some mobile OS put a heavy drain on a device’s battery, requiring frequent
Most systems are easy for users to learn and operate.
recharging.
Some systems are not user-friendly.

Examples of mobile operating systems include Android OS, Apple and Windows mobile OS.
Types of operating systems – cont…
Common operating systems
Here are the most common operating systems in use:
Microsoft Windows
Created by Microsoft, Microsoft Windows is one of the most popular proprietary operating systems for
computers in the world. Most personal computers come preloaded with a version of Microsoft Windows.
One downside of Windows is that compatibility with mobile phones has been problematic.
Apple iOS
Apple iOS from Apple is used on smartphones and tablets manufactured by the same company. Users of
this system have access to hundreds of applications. The operating system offers strong encryption
capabilities to control unauthorized access to users' private data.
Google Android
Android from Google is the most popular operating system in the world. It's mainly used on tablets and
smartphones. It also runs on devices made by other manufacturers. Users have access to numerous mobile
applications available on the Google Play Store.
Apple macOS
Developed by Apple, this proprietary operating system runs on the manufacturer's personal computers and
desktops. All Apple and Macintosh computers come equipped with the latest version of macOS, previously
known as OS X systems. The ability to prevent bugs and fend off hackers make Apple operating systems
popular with their users.
Linux
Created by the Finnish programmer Linus Torvalds, Linux is today developed by programmer
collaborators across the world who submit tweaks to the central kernel software. Linux is popular with
programmers and corporate servers. It is available for free online.
Command Line based OS (DOS)
Disk Operating System (DOS) is a kind of operating system that uses commands (words) to interact with the computer. The
DOS didn't use mouse pointers, icons, or any graphics, so users were stuck with using text-commands to operate the computer
system.
DOS is also used to describe several similar command-line disk operating systems. Early computers, such as
the Commodore 64, Atari 800 and Apple II, all featured a disk operating system, including Commodore
Business Machines DOS, Atari DOS and Apple DOS, respectively. DOS/360 was an OS for IBM mainframes,
which first appeared in 1966, but it is unrelated to the 8086-based DOS of the 1980s.
How does a disk operating system work?
When a computer is powered on it goes through various steps called the boot process. For a computer
running a disk operating system, the following six steps are standard:
1.The read-only memory (ROM) bootstrap loader reads the Master Boot Record and passes control over to it.
2.The boot record loads the disk operating system into memory, and it takes control of the machine.
3.The computer transfers data stored on a magnetic disk to its main memory, the random access memory.
4.It also transfers data to external devices attached to the computer, such as a computer screen or printer.
5.The computer provides various application programming interfaces for programs like character input/output
(I/O), memory management, program loading and termination, as well as handling input from the user through
a keyboard.
6.The OS also provides file management that organizes, reads and writes files on storage. The files are
organized in a hierarchical structure of directories, subdirectories and files.
A disk operating system doesn't have a graphical user interface (GUI). Its interface is character-based, so
users must type commands in the command line to indicate what actions they want.
Command Line based OS (DOS) – cont…

Common DOS commands


MS-DOS is not case-sensitive, so commands can be typed in either uppercase or lowercase. However, other
disk operating systems have case-sensitive CLIs. DOS commands include the following.
Command Line based OS (DOS) – cont…
Command What it does Example
Type cd c:\techtarget in the command line to change the
cd Changes directory working directory to c:\techtarget.
Clears all the contents on the screen, leaving only the command
cls prompt Type cls in the command line.

Type copy c:\techtarget\file.txt c:\techtarget\file2.txt to copy c:\


copy Copies one or more files to another location
techtarget\file.txt to c:\techtarget\file2.txt.
Type del c:\techtarget\file2.txt to delete the file file.txt from the
del Deletes one or more files directory c:\techtarget.
Type deltree c:\techtarget\drafts to delete the directory drafts,
deltree Deletes all files and subdirectories from a computer
including all files and subdirectories contained in it.
Type dir c:\techtarget to display a list of files and directories in
dir Displays a list of files and directories in a directory
the directory c:\techtarget.
format Formats a disk for DOS files Type format e: to format the disk in drive e: for use with DOS.
Type help del to display information about the del command and
help Lists the available commands or more information about a how to use it. Most commands have optional switches that are
specific command explained in the help information.
Type mkdir c:\techtarget\drafts to create the subdirectory drafts
in the c:\techtarget directory.

Moves files or directories from one directory to another or from Type move c:\techtarget\file.txt c:\techtarget\drafts\file.txt to
move
one drive to another move c:\techtarget\file.txt to c:\techtarget\drafts\file.txt.

Type ren c:\techtarget\file.txt c:\techtarget\file2.txt to rename


ren or rename Changes the name of a file or directory
the file c:\techtarget\file.txt to c:\techtarget\file2.txt.

Type type c:\myfile.txt to show the contents of the myfile.txt


type Displays the contents of a file on the screen
file.
A wildcard character that represents one or more characters a Type copy c:\techtarget\*.txt c:\techtarget\drafts to copy all files
*
group of files has in common with the extension of .txt to c:\techtarget\drafts.
Type copy c:\techtarget\document?.txt c:\techtarget\drafts to
? A wildcard character that represents a single character a group copy files named document1.txt, document2.txt and so on to c:\
of files has in common
techtarget\drafts.
Command Line based OS (UNIX)
Most current Unix-based systems offer both a command-line interface and a graphical user interface. The MS-DOS
operating system and the command shell in the Windows operating system are examples of command-line interfaces.

Uses of Unix Commands :

1.File and directory management: Unix commands like ls, cd, cp, mv, rm, mkdir, and rmdir are used for managing files and directories. These commands allow users to
create, delete, copy, move, and rename files and directories.
2.Process management: Unix commands like ps and kill are used for managing running processes. Users can use these commands to list all running processes, view process
details, and terminate a process if necessary.
3.User management: Unix commands like passwd, useradd, userdel, and groupadd are used for managing user accounts and groups. These commands allow system
administrators to add or delete user accounts, change user passwords, and manage group memberships.
4.Text manipulation: Unix commands like cat, grep, sed, and awk are used for manipulating text files. These commands allow users to view, search, replace, and format text
files.
5.Networking: Unix commands like ping, ifconfig, netstat, and traceroute are used for configuring and troubleshooting network connections. These commands allow users to
test network connectivity, view network interface details, and diagnose network problems.
6.System configuration: Unix commands like chmod, chown, and sysctl are used for configuring system settings. These commands allow users to change file permissions,
file ownership, and system parameters.
7.Programming: Unix commands like gcc, make, and gdb are used for compiling and debugging programs. These commands are essential for developers who write
programs in C or C++.
Issues in Unix Commands :
8.Command syntax errors: Unix commands are sensitive to syntax errors, which can lead to unexpected behavior or errors. Users must be careful to use the correct
command syntax and to include all required parameters.
9.Permissions issues: Unix commands are subject to file permissions, which can restrict access to certain files or directories. Users may need to use the chmod or chown
commands to change file permissions or file ownership to access certain files.
10.Security risks: Some Unix commands can be used to compromise system security, such as allowing unauthorized access to files or executing malicious code. Users must
be careful to use Unix commands only for authorized tasks and to avoid running unknown scripts or commands.
11.Lack of user interface: Unix commands are typically executed from the command line, which can be intimidating for users who are used to graphical user interfaces.
Users may need to spend time learning the syntax and usage of Unix commands to be effective.
12.Limited documentation: While Unix commands are well-documented, some commands may not have complete or clear documentation. Users may need to rely on online
resources or community forums to find answers to specific issues.
Command Line based OS (UNIX)-cont…
Basic unix commands:
1. who : The ‘$ who’ command displays all the users who have logged into the system currently. As shown above, on my system I am the only user currently logged
in.The thing tty2 is terminal line the user is using and the next line gives the current date and time
$ who Output: harssh tty2 2017-07-18 09:32 (:0)
2. pwd : The ‘$pwd’ command stands for ‘print working directory’ and as the name says, it displays the directory in which we are currently (directory is same as
folder for Windows OS users).
In the output, we are harssh directory(folder for Windows OS that are moving to Linux),which is present inside the home directory.
$ pwd
Output: /home/harsh

3. mkdir : The ‘$ mkdir’ stands for ‘make directory’ and it creates a new directory.We have used ‘$ cd’ (which is discussed below) to get into the newly created
directory and again on giving ‘$ pwd’ command,we are displayed with the new ‘newfolder’ directory.
$ mkdir newfolder
$ cd newfolder
$ pwd
Output: /home/harssh/newfolder
4. rmdir : The ‘$ rmdir’ command deletes any directory we want to delete and you can remember it by its names ‘rmdir’ which stands for ‘remove directory’.

$ rmdir newfolder

5. cd : The ‘$ cd’ command stands for ‘change directory’ and it changes your current directory to the ‘newfolder’ directory.You can understand this a double-
clicking a folder and then you do some stuff in that folder.

$ cd newfolder (assuming that there is a directory named 'newfolder' on your system)


Command Line based OS (UNIX) - cont…
Basic unix commands:
6. ls : The ‘ls’ command simply displays the contents of a directory.
$ ls
Output: Desktop Documents Downloads Music Pictures Public Scratch Templates Videos

7. touch : The ‘$ touch’ command creates a file(not directory) and you can simple add an extension such as .txt after it to make it a Text File.
$ touch example
$ ls
Output: Desktop Documents Downloads Music Pictures Public Scratch Templates Videos example

8. cp : This ‘$ cp ‘ command stands for ‘copy’ and it simply copy/paste the file wherever you want to.In the above example, we are copying a file ‘file.txt’ from
the directory harssh to a new directory new.
$ cp /home/harssh/file.txt /home/harssh/new/

9. mv : The ‘$ mv’ command stands for ‘move’ and it simply move a file from a directory to another directory.In the above example a file named ‘file.txt’ is being
moved into a new directory ‘new’
$ mv /home/harssh/file.txt /home/harssh/new

10. rm : The ‘$ rm ‘ command for remove and the ‘-r’ simply recursively deletes file. Try ‘$ rm filename.txt’ at your terminal 🙂
$ rm file.txt

11. chmod : The ‘$ chmod’ command stands for change mode command.As there are many modes in Unix that can be used to manipulate files in the Unix
environment.Basically there are 3 modes that we can use with the ‘chmod’ command
1. +w (stands for write and it changes file permissions to write)
2. +r (stands for read and it changes file permissions to read)
3. +x (generally it is used to make a file executable)
$ chmod +w file.txt
$ chmod +r file.txt
$ chmod +x file.txt
Command Line based OS (UNIX) - cont…

Basic unix commands:


12. cal : The ‘$ cal’ means calendar and it simply display calendar on to your screen.
$ cal
Output : July 2017
Su Mo Tu We Th Fr Sa
1
2345678
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
13. file : The ‘$ file’ command displays the type of file.As I mentioned earlier Linux treats everything as a file so on executing the command file on a directory(Downloads) it displays directory as the output
$ ls
Output: Desktop Documents Downloads Music Pictures Public Scratch Templates Videos
$ file Downloads
Output: Downloads: directory
14. sort : As the name suggests the ‘$ sort’ sorts the contents of the file according to the ASCII rules.
$ sort file
15. grep : grep is an acronym for ‘globally search a regular expression and print it’.The ‘$ grep’ command searches the specified input fully(globally) for a match with the supplied pattern and displays it.
In the example, this would search for the word ‘picture’ in the file newsfile and if found,the lines containing it would be displayed on the screen.

$ grep picture newsfile


16. man : The ‘$ man’ command stands for ‘manual’ and it can display the in-built manual for most of the commands that we ever need.In the above example, we can read about the ‘$ pwd’ command.
$ man pwd
17. lpr : The ‘$ lpr’ command send a file to the printer for printing.
$ lpr new.txt
18. passwd : The ‘$ passwd’ command simply changes the password of the user.In above case ‘harssh’ is the user.
$ passwd
Output: Changing password for harssh.
(current) UNIX password:
19. clear : The ‘$ clear’ command is used to clean up the terminal so that you can type with more accuracy 🙂
$ clear
20. history : The ‘$ history’ command is used to get list of previous commands may be obtained by executing the following command. you can also use parameters like !n to re-execute the nth command, !! to
executes the most recent command, and !cp this will execute the most recent command that starts with cp.
$ history
GUI based OS (Windows)
GUI stands for Graphical User Interface. It is a visual representation of communication presented to the user for easy
interaction with the machine. The actions in a GUI are usually performed through direct manipulation of graphical
elements like buttons and icons. Communication can be performed by interacting with these icons rather than the
usual text-based or command-based communication.
GUI based OS (Windows) – cont…

There are several different visual programming languages with their unique advantages for developing a graphical user interface
design. C # or Java may be preferable due to their ability to run GUIs simultaneously in a browser and as a desktop application.
Other languages are also be preferred, such as Python, HTML5/Javascript, and C/C++.
There are different elements and objects that the user use to interact with the software to make a user friendly GUI.
• Button: A graphical representation of a button that acts as a program when pressed.
• Dialogue box: A type of window that displays additional information and asks a user for input.
• Icon: Small graphical representation of a program, features, or file.
• Menu: List of commands or choices offered to the user through the menu bar.
• Ribbon: Replacement for the file menu and toolbar that groups programs activities together.
• Tab: Clickable area at the top of a window that shows another page or area.
• Toolbar: Row of buttons, often near the top of an application window, that controls software functions.
• Window: Rectangular section of the computer's display that shows the program currently being used.
Microsoft Windows
Microsoft Windows is one of the most common GUI based operating systems. It is developed and marketed by Microsoft. The current version of
Microsoft Windows is Windows 10. Moreover, it has several earlier versions like Windows XP, Windows 8, Windows 7, etc. Besides, the most
common editions for home computers are Windows Home (Win Home) and Windows Professional (Win Pro or Windows Pro).

Linux
Linux is a popular operating system. It is not a part of any particular firm or organization. Rather, it was developed by a programmer Linus
Torvalds in 1991. It is an open-source operating system. Today, LINUX is run in many organizations, private offices, on mobiles,
supercomputers, over the internet, etc.
How Graphical User Interface Works?
Graphical user interface design principles follow the model-view-controller software pattern, which separates internal representations
of information from how information is presented to the user, resulting in a platform where users are shown which functions are
possible rather than requiring the input of command codes.

•Users interact with information by manipulating visual widgets, designed to respond by the type of data they hold and support the actions
necessary to complete the user's task.
•The appearance of an operating system or application software may be redesign due to the nature of graphical user interfaces independent of
application functions.
•Applications typically implement their own unique graphical user interface display elements and already present on the existing operating
system.
•A typical graphical user interface also includes standard formats for representing graphics and text, sharing data between applications running
under common graphical user interface design software.
•Graphical user interface testing refers to the systematic process of generating test cases to evaluate the system's functionality and design
elements.
•Graphical user interface testing tools (manual or automated) are available under various licenses and supported by various platforms.
Below are some more differences between GUI and CUI Operating System, such as:
END

You might also like