Operating System Notes 1
Operating System Notes 1
1
Program: Set of instruction is called program. A computer program is a collection of instructions
that performs a specific task when executed by a computer. Most computer devices require
programs to function properly. A computer program is usually written by a computer programmer
in a programming language.
Commands: A command is a set of data or a data item which meaning is predefined. A command
is a directive to a computer program acting as an interpreter of some kind to perform a specific task.
Instructions: Instruction is a set of command. Computer instructions are a set of machine language
instructions that a particular processor understands and executes. A computer performs tasks on the
basis of the instruction provided.
Software: Software is a set of programs. Software is a collection of programs that enable the user to
interact with a computer, its hardware, or perform tasks. Without software, most computers would
be useless. Software is a set of instructions, data or programs used to operate computers and execute
specific tasks.
Process: A process is a program during execution. A process is a program that is running on your
computer. This can be anything from a small background task, such as a spell-checker or system
events handler to a full-blown application like Internet Explorer or Microsoft Word. All processes
are composed of one or more threads.
Information: Information is data that has been processed in such a way as to be meaningful to the
person who receives it. It is anything that is communicated.
Information is organized or classified data, which has some meaningful values for the receiver.
Information is the processed data on which decisions and actions are based.
For the decision to be meaningful, the processed data must qualify for the following characteristics-
Timely − Information should be available when required.
Accuracy − Information should be accurate.
Completeness − Information should be complete.
Message: A message is a bit of data, which is sent by a sender, to a recipient. This is usually done
by copying the data around.
1.2 Program: Set of instruction is called program There are mainly two categories of programs i.e.
application programs and system programs.
Application program: An application program can be self-contained or a group of programs. The
program is a set of operations that runs the application for the user. Examples of applications
include word processors, database programs, web browsers, development tools, image editors and
communication platforms.
The requests for service and application communication systems used in an application by a
programmer is known as an application program interface (API).
System programs: The system programs are used to program the operating system software. While
application programs provide software that is used directly by the user, system programs provide
software that are used by other systems such as SaaS applications, computational science
applications etc.
The attributes of system programming are:
Using system programming, a programmer can make assumptions about the hardware of the
system that the program runs on.
2
A low level programming language is used in system programming normally. This is so that
the programs can operate in low resource environments easily.
Most system programs are created to have a low runtime overhead. These programs may
have small runtime library.
Some parts of the system programs may be directly written in assembly language by the
programmers.
Application software is a program or group of programs designed for end users. Examples of an
application include a word processor, a spreadsheet, an accounting application, a web browser, an
email client, a media player, a file viewer, simulators, a console game or a photo editor.
The system programs are used to program the operating system software. While application
programs provide software that is used directly by the user, system programs provide software that
are used by other systems such as Software As A Service (SaaS) applications, computational
science applications etc.
System software is software designed to provide a platform for other software. Examples of system
software include operating systems like macOS, GNU/Linux , Android and Microsoft Windows,
computational science software, game engines, industrial automation, and software as a service
applications.
3
Firmware: firmware is a computer program that is "embedded" in a hardware device and is an
essential part of the hardware. It is sometimes called embedded software. An example is a
microcontroller, a part of the microprocessor that tells the microprocessor what actions to take.
Firmware is a software program or set of instructions programmed on a hardware device. It
provides the necessary instructions for how the device communicates with the other computer
hardware. Firmware is typically stored in the flash ROM of a hardware device.
Web browser, a browser is a software application used to locate, retrieve and display content on
the World Wide Web, including webpages, images, video and other files. As a client/server model,
the browser is the client run on a computer or mobile device that contacts the Web server and
requests information.
A web server is software and hardware that uses HTTP (Hypertext Transfer Protocol) and other
protocols to respond to client requests made over the World Wide Web. The main job of a web
server is to display website content through storing, processing and delivering webpages to users.
The Internet is the global system of interconnected computer networks that uses the Internet
protocol suite (TCP/IP) to communicate between networks and devices.
Interpreter:
Interpreter is a translator which is used to convert programs in high-level language to low-level
language. Interpreter translates line by line and reports the error once it encountered during the
translation process. It directly executes the operations specified in the source program when the
input is given by the user. It gives better error diagnostics than a compiler.
4
Differences between compiler and interpreter
4 Debugging is hard as the error messages It stops translation when the first error is
are generated after scanning the entire met. Hence, debugging is easy.
program only.
Assembler:
Assembler is a translator which is used to translate the assembly language code into machine
language code.
1.6 Text editor: A text editor is a type of computer program that edits plain text (created and edited
by text editors). A text editor is used to edit plain text files. Notepad and WordPad - Microsoft
Windows included text editors. TextEdit - Apple computer text editor. Emacs - Text editor for all
platforms that is a very powerful text editor once you've learned all its commands and options. Rich
text (such as that created by word processors or desktop publishing software).
5
The present-day popular OS Windows first came to existence in 1985 when a GUI was
created and paired with MS-DOS.
Operating system has been evolving through the years. Following Table shows the history of OS.
Features of Kennel
Low-level scheduling of processes
Inter-process communication
Process synchronization
Context switching
Types of Kernels: There are many types of kernels that exists, but among them, the two most
popular kernels are:
1. Monolithic: A monolithic kernel is a single code or block of the program. It provides all the
required services offered by the operating system. It is a simplistic design which creates a
distinct communication layer between the hardware and software.
2. Microkernels: Microkernel manages all system resources. In this type of kernel, services are
implemented in different address space. The user services are stored in user address space,
and kernel services are stored under kernel address space. So, it helps to reduce the size of
both the kernel and operating system.
3. Hybrid Kernel: This Kernel is what we see most. Windows, Apple’s macOS. They are a mix
of Monolithic Kernel and Microkernel. It moves out drivers but keeps system services inside
the Kernel – similar to how drivers are loaded when Windows Starts the bootup process.
6
4. Nano Kernel: If you need to have a kernel, but its majority of function is set up outside, then
this comes into the picture.
5. Exo Kernel: This kernel only offers process protection and resource handling. However it is
mostly used when you are testing out an inhouse project, and you upgrade to a better Kernel
type.
7
Interruptions
In User Mode, if an interrupt occurs, only In Kernel Mode, if an interrupt occurs, the
one process fails. whole operating system might fail.
Restrictions
In user mode, there are restrictions to access
In kernel mode, both user programs and kernel
kernel programs. Cannot access them
programs can be accessed.
directly.
Shell: Shell is a user interface for access to an operating system's services. In general, operating
system shells use either a command-line interface (CLI) or graphical user interface (GUI),
depending on a computer's role and particular operation. The main difference between kernel and
shell is that the kernel is the core of the operating system that controls all the tasks of the system
while the shell is the interface that allows the users to communicate with the kernel. Unix is an
operating system. It is the interface between the user and the hardware.
Shell Prompt:
The prompt, $, which is called command prompt, is issued by the shell. While the prompt is
displayed, you can type a command.
$date
Thu Aug 25 10:30:39 MST 2020
Shell Types: In UNIX there are two major types of shells:
The Bourne shell. If you are using a Bourne-type shell, the default prompt is the $
character.
8
The C shell. If you are using a C-type shell, the default prompt is the % character.
There are again various subcategories for Bourne Shell which are listed as follows:
Bourne shell ( sh)
Korn shell ( ksh)
Bourne Again shell ( bash)
POSIX shell ( sh)
The different C-type shells follow:
C shell ( csh)
TENEX/TOPS C shell ( tcsh)