Unit 4
Unit 4
Primary Memory is a section of computer memory that the CPU can access directly. Primary
Memory has a faster access time than secondary memory and is faster than cache memory in
a memory hierarchy. Primary Memory, on average, has a storage capacity that is lower than
secondary memory but higher than cache memory.
• All applications, files, and data are kept on secondary storage, which is larger and has a longer
access time.
• A CPU or processor cannot access secondary memory directly.
• The operating system loads any process into Primary Memory, which is comparatively smaller and
can be directly accessed by the CPU in order to execute it.
• Because only those programmes are loaded in Primary Memory and are ready to be performed, the
CPU may access them quickly, thus improving the system’s speed.
Types of ROM
We can classify ROM into three major types on the basis of their behaviour. They are:
1. PROM – The user can only change the programmable ROM once. The user purchases a
blank PROM and writes the required text on it; however, the content cannot be changed once
it has been written.
2. EPROM – ROM that can be erased and programmed by removing the original material,
which can be done by exposing EPROM to UV radiation, and the content can be modified.
The charge on the ROM is dissipated by the ultraviolet light, allowing content to be rewritten
on it.
3. EEPROM – The initial content of an electrically erasable and programmable ROM can be
modified by erasing the content that can be easily deleted electrically. Instead of removing
everything at once, one byte can be wiped at a time. As a result, reprogramming an EEPROM
is a time-consuming procedure.
Types of RAM
We can broadly classify RAM into SRAM or Static RAM and DRAM or Dynamic RAM on
the basis of behaviour.
1. DRAM- To keep data, dynamic RAM, or DRAM, must be refreshed every few
milliseconds. DRAM is made up of capacitors and transistors, and capacitors leak electric
charge; hence DRAM must be charged on a regular basis. Because DRAM is less expensive
than SRAM, it is commonly used in personal computers and servers.
2. SRAM – The data is stored in static RAM, or SRAM, as long as the system is powered on.
SRAM stores a bit using sequential circuits, similar to a flip-flop, so it does not need to be
refreshed on a regular basis. Because SRAM is so expensive, it’s only used when speed is
critical.
Data that doesn't require primary storage can be migrated to secondary storage
devices to free up space and improve performance on primary storage devices,
while lowering overall storage costs. Organizations typically use secondary storage
for backup and disaster recovery (DR) data, archival data, or noncritical active
data. Secondary storage is also referred to as auxiliary storage.
(study in brief about Magnetic Tapes Magnetic Disks Cartridge tapes Hard disks Floppy disks
Optical Disks Compact Disks Zip Drive Flash Drives Solid State Drive)
What is Software?
"Software is a set of programs (sequence of instructions) that allows the users to perform a
well-defined function or some specified task."
Software is responsible for directing all computer-related devices and instructing them
regarding what and how the task is to be performed. However, the software is made up of
binary language (composed of ones and zeros), and for a programmer writing the binary code
would be a slow and tedious task. Therefore, software programmers write the software program
in various human-readable languages such as Java, Python, C#, etc. and later use the source
code.
1. System Software
System software is a computer program that helps the user to run computer hardware or
software and manages the interaction between them. Essentially, it is software
that constantly runs in the computer background, maintaining the computer hardware
and computer's basic functionalities, including the operating system, utility software, and
interface. In simple terms, you can say that the system acts as a middle man that checks and
facilitates the operations flowing between the user and the computer hardware.
System software is not limited to the operating system. They also include the basic I/O system
procedures, the boot program, assembler, computer device driver, etc. This software supports
a high-speed platform to provide effective software for the other applications to work in
effortlessly. Therefore system software is an essential part of your computer system. They are
the first thing that gets loaded in the system's memory wherever you turn on your
computer. System software is also known as "low-level software" because the end-users do
not operate them. Companies usually employ the best software development programmers who
can deploy efficient system software.
1. Operating System
The operating system is the most prominent example of system software that acts as an
interface between the user and system hardware. It is a group of software that handles the
execution of programs and offers general services for the application that runs over the
computer. There are various types of operating systems available in the market, such as
embedded operating systems, real-time OS, distributed OS, single or multi-user operating
system, mobile, Internet, and various others.
Utility
Utility software is developed to provide support in analyzing, optimizing, along
configuring and maintaining a computer. The job of the utility program is to offer support
to the system infrastructure. Though the system will work even if it doesn't have any utility
software, the right kind of utility software enhances its performance and makes it more reliable.
Application Software
Application programs or software applications are end-user computer programs
developed primarily to provide specific functionality to the user. The applications
programs assist the user in accomplishing numerous tasks such as doing online research,
completing notes, designing graphics, managing the finances, watching a movie, writing
documents, playing games, and many more. Therefore, many software applications are
designed and developed every year by companies as per the demand and requirements of the
potential users. The application software can either be designed for a general-purpose or
specially coded as per the requirements of business cooperation.
OPERATING SYSTEM
An operating system is a program that acts as an intermediate part between a user of a
computer and the computer hardware and controls the execution of all kinds of programs.An
operating system is the program that, after being initially loaded into the computer by a boot
program, manages all the other programs in a computer.
Objectives of OS:
1.Convenience: An OS makes a computer more convenient to use.
2.Efficiency: An OS allows the computer system resources to be used in an efficient manner.
3.Ability to evolve: An OS should be constructed in such a way as to permit the effective
development, testing, and introduction of new system functions without interfering with
service.
Functions of an operating System are as follows:
Memory Management: Memory management refers to management of Primary Memory or
Main Memory.An Operating System does the following activities for memory management:
OS Keeps tracks of primary memory, i.e., what part of it are in use by whom, what part are
not in use.In multi-programming, the OS decides which process will get memory when and
how much.OS allocates the memory when a process requests it to do so. It de-allocates the
memory when a process no longer needs it or has been terminated.
Processor Management: In multi-programming environment, the OS decides which process
gets the processor when and for how much time. This function is called process scheduling.
An Operating System does the following activities for processor management: OS keeps
tracks of processor and status of process.OS allocates the processor (CPU) to a process.It de-
allocates processor when a process is no longer required.
Device Management: An Operating System manages device communication via their
respective drivers. It does the following activities for device management: Keeps tracks of all
devices. The program responsible for this task is known as the I/O controller. Decides which
process gets the device when and for how much time. OS allocates the device in the most
efficient way.It de-allocates devices in most efficient way.
File Management: A file system is normally organized into directories for easy navigation
and usage. These directories may contain files and other directions.An Operating System
does the following activities for file management: Keeps track of information, location, uses,
status etc. The collective facilities are often known as file system. OS Decides who gets the
resources.It allocates the resources and also de-allocates the resources when not in need.
Security: OS prevents unauthorized access to programs and data.For shared or public
systems, the OS controls access to the system as a whole and to specific system resources.
Control over system performance: OS will collect usage statistics for various resources and
monitor performance parameters such as response time,Recording delays between request for
a service and response from the system.
Job accounting: OS Keeps track of time and resources used by various jobs and users.On
any system, this information is useful in anticipating the need for future enhancements and in
tuning the system to improve performance and can be used for job accounting purposes.
Error detection & Response: A variety of errors can occur while a computer system is
running. These include internal and external hardware errors, such as a memory error, or a
device failure or malfunction; and various software errors.In each case, the OS must provide
a response that clears the error condition with the least impact on running applications. The
response may range from ending the program that caused the error, to retrying the operation,
to simply reporting the error to the application,Production of dumps, traces, error messages,
and other debugging and error detecting aids.
Booting the computer: Booting is the process of starting or restarting the computer. If
computer is switched off completely and then turned on then it is cold booting.If computer is
restarted then it is warm booting.Booting of the computer is done by OS.
Coordination between other software and users: An OS enables coordination of hardware
components, coordination and assignment of compilers, interpreters, assemblers and other
software to the various users of the computer systems.
Language processors
1. Compiler
The language processor that reads the complete source program written in high-level
language as a whole in one go and translates it into an equivalent program in
machine language is called a Compiler. Example: C, C++, C#.
In a compiler, the source code is translated to object code successfully if it is free of
errors. The compiler specifies the errors at the end of the compilation with line
numbers when there are any errors in the source code. The errors must be removed
before the compiler can successfully recompile the source code again the object
program can be executed number of times without translating it again.
2. Assembler
The Assembler is used to translate the program written in Assembly language into
machine code. The source program is an input of an assembler that contains
assembly language instructions. The output generated by the assembler is the object
code or machine code understandable by the computer. Assembler is basically the
1st interface that is able to communicate humans with the machine. We need an
assembler to fill the gap between human and machine so that they can communicate
with each other. code written in assembly language is some sort of
mnemonics(instructions) like ADD, MUL, MUX, SUB, DIV, MOV and so on. and
the assembler is basically able to convert these mnemonics in binary code. Here,
these mnemonics also depend upon the architecture of the machine.
For example, the architecture of intel 8085 and intel 8086 are different.
3. Interpreter
The translation of a single statement of the source program into machine code is
done by a language processor and executes immediately before moving on to the
next line is called an interpreter. If there is an error in the statement, the interpreter
terminates its translating process at that statement and displays an error message.
The interpreter moves on to the next line for execution only after the removal of the
error. An Interpreter directly executes instructions written in a programming
or scripting language without previously converting them to an object code or
machine code. An interpreter translates one line at a time and then executes
it.
Example: Perl, Python and Matlab.
What is the Multiprogramming Operating System?
On a single processor computer, a multiprogramming OS can run many programs. In a
multiprogramming OS, if one program must wait for an input/output transfer, the other
programmes are ready to use the CPU. As a result, different jobs may have to split CPU time.
However, their jobs are not scheduled to be completed at the same time.
Multiprogramming’s main purpose is to manage all of the system’s resources. The file
system, transient area, command processor, and I/O control system are the main components
of a multiprogramming system. As a result, the multiprogramming OS is built to store many
programs based on sub-segmenting the transient area. The operating system’s essential
functions are tied to the resource management processes.
Multiple CPUs are linked together so that a job can be divided and executed more quickly.
When a job is completed, the results from all CPUs are compiled to provide the final output.
Jobs were required to share main memory, and they may often share other system resources.
Multiple CPUs can be used to run multiple tasks at the same time, for example, UNIX.
One of the most extensively used operating systems is the multiprocessing operating system.
The following diagram depicts the basic organisation of a typical multiprocessing system.
The computer system should have the following features to efficiently use a multiprocessing
operating system:
Pros of Multiprocessing OS
Increased reliability: Processing tasks can be spread among numerous processors in the
multiprocessing system. This promotes reliability because if one processor fails, the task can
be passed on to another.
Increased throughout: More work could be done in less time as the number of processors
increases.
The economy of scale: Multiprocessor systems are less expensive than single-processor
computers because they share peripherals, additional storage devices, and power sources.
Cons of Multiprocessing OS
Multiprocessing operating systems are more complex and advanced since they manage many
CPUs at the same time.
Features of Time-Sharing OS
Users can benefit from the following advantages provided by the time-sharing OS:
Pros of Time-Sharing OS
The following are some of the benefits of the time-sharing operating system:
Cons of Time-Sharing OS
The following are some of the downsides of the time-sharing operating system:
DOS
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.
MS-DOS
Features:
Limitations:
Application Software is a type of computer program that performs specific functions. These
functions, performed by application software, can be personal, business as well as
educational. Thus, application Software is also known as end-user software or productivity
software.
Each software program is developed to assist users with the particular process related to
productivity, efficiency, and communication. Unlike System Software, Application Software
is specific for its functionality and completes the task that they are developed to do. The
majority of apps that we see on our smartphones are examples of application software.
1. Word Processing Software
Word processing software is used to format, beautify, and manipulate text. It allows features
such as synonyms and antonyms. You can change the fonts, colors, and style according to
your choice with the word art feature. Error checking as well as grammar and spell checking
options are also available in it. Microsoft Word is the best example of a word processing
software.
2. Spreadsheet Software
Spreadsheet software is majorly used to store data in table format and perform calculations.
Intersecting cells are given in a spreadsheet to keep various data fields such as time, date,
text, and numbers. Users can perform calculations with formulas and functions. The best
example of spreadsheet software is Microsoft Excel.
3. Presentation Software
Presentation Software lets you put forth your thoughts and ideas in a piece of visual
information. Then, you can present that information in the form of slides. You can make your
slides interactive and informative by adding videos, texts, charts, graphs, and images. The
best example of presentation software is Microsoft PowerPoint.
4. Graphics Software
Graphics Software is used to make changes in visual data, images, and animation. It
comprises different editorial software. Adobe Photoshop, Unity 3d, and PaintShop are
examples of graphics software.
5 DBMS Software
Database software is a software program or utility used for creating, editing and maintaining
database files and records. This type of software allows users to store data in the form of
structured fields, tables and columns, which can then be retrieved directly and/or through
programmatic access.
Programming languages
Machine-level language
The machine-level language is a language that consists of a set of instructions that are in the
binary form 0 or 1. As we know that computers can understand only machine instructions,
which are in binary digits, i.e., 0 and 1, so the instructions given to the computer can be only
in binary codes. Creating a program in a machine-level language is a very difficult task as it is
not easy for the programmers to write the program in machine instructions. It is error-prone as
it is not easy to understand, and its maintenance is also very high. A machine-level language is
not portable as each computer has its machine instructions, so if we write a program in one
computer will no longer be valid in another computer.
The different processor architectures use different machine codes, for example, a PowerPC
processor contains RISC architecture, which requires different code than intel x86 processor,
which has a CISC architecture.
Assembly Language
The assembly language contains some human-readable commands such as mov, add, sub, etc.
The problems which we were facing in machine-level language are reduced to some extent by
using an extended form of machine-level language known as assembly language. Since
assembly language instructions are written in English words like mov, add, sub, so it is easier
to write and understand.
As we know that computers can only understand the machine-level instructions, so we require
a translator that converts the assembly code into machine code. The translator used for
translating the code is known as an assembler.
The assembly language code is not portable because the data is stored in computer registers,
and the computer has to know the different sets of registers.
The assembly code is not faster than machine code because the assembly language comes
above the machine language in the hierarchy, so it means that assembly language has some
abstraction from the hardware while machine language has zero abstraction.
High-Level Language
The high-level language is a programming language that allows a programmer to write the
programs which are independent of a particular type of computer. The high-level languages are
considered as high-level because they are closer to human languages than machine-level
languages.
When writing a program in a high-level language, then the whole attention needs to be paid to
the logic of the problem.