Unit 1
Unit 1
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
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.
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 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…
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.
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.
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…
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