Chapter 4 Software
Chapter 4 Software
Software:
Software refers to a collection of instructions, data, and programs that enable computers to
perform specific tasks or functions.
Types of software and interrupts:
Software can be broadly categorized into two main types:
system software
application software
Figure will show you that there are two categories of software: application software and system
software.
System software:
System software includes operating systems, device drivers, utility programs, and other
software that provides essential functions for the computer to operate.
Application software:
Application software, on the other hand, refers to programs designed to perform specific tasks
or cater to particular user needs.
permits the user to use the computer's resources to carry out particular tasks
could be a single application (like Notepad) or a group of apps (like Microsoft Office)
utilized to carry out different computer programs, or apps
The software can be used whenever and however the user sees fit.
may utilize it immediately to carry out a task. High-level languages include Fortran, C++, Java,
Python, Visual Basic, and Algol.
OPERATING SYSTEMS (O/S): In essence, the operating system (OS) is software that runs on a
computer system in the background. In essence, the operating system (OS) is software that runs
on a computer system in the background:
Defragmentation software:
In this example we have three files (1, 2 and 3) stored on track 8 of a disk surface covering all 12
sectors:
Sure, let's consider the scenario where three files, labeled as 1, 2, and 3, are stored on track 8 of
a disk surface, covering all 12 sectors. Let's represent the sectors as S1, S2, S3,..., S12.
Each file occupies four consecutive sectors on the disk track, resulting in a total of 12 sectors
being used for the three files.
Since the HDD will now need to make fewer read-write head movements in order to access and
retrieve directories 1 and 3, this clearly enables significantly faster data access and retrieval.
Following the process of defragmentation, track 11 would be vacant.
Back-up software:
Although utilizing a memory stick or portable HDD for manual backups makes sense, it's also a
good idea to use the operating system backup tool. This tool will:
Permit the creation of a backup schedule for files.
Perform a backup procedure solely in the event that a file has undergone modifications.
Security software:
Security software is a general-purpose tool that:
ensures that any data intercepted is useless without a decryption key by using
encryption and decryption.
links to further useful programs, such spyware and virus detectors
shields network interfaces (for instance, by using firewalls)
supervises software updates (e.g., does the update request originate from a reliable
source).
oversees user accounts and access control (using user IDs and passwords)
Screensavers:
Programs known as screensavers display both moving and motionless images on the monitor
screen when the computer is idle for a while. They were first created to shield more ancient
CRT (cathode ray tube) displays from "phosphor burn," which occurred when the same image
on the screen stayed on for an extended period of time. For example:
Certain screensavers are frequently used to start helpful background processes that are limited
to operating while the computer is in the "idle" state. As an illustration:
virus scans
Applications for distributed computing such as online gaming apps let programs use the
computer's resources only while it's not in use.
Device drivers:
Device drivers are programs that interface with the operating system and convert data into a
form that is comprehensible to peripheral hardware.
A set of data about devices known as descriptors is contained in all USB device drivers; this
enables the USB bus to inquire about the nature of a freshly connected device. Vendor id (VID),
product id (PID), and unique serial numbers are examples of descriptors.
Operating systems:
Operating systems (OS) are software programs that manage computer hardware resources and
provide a platform for running other software applications. They serve as an intermediary
between the hardware and software layers of a computer system, facilitating communication
and coordination between various components. Due to the fact that operating systems are
typically quite large programs, most computers store them on a hard disk drive (HDD) or solid-
state drive (SSD). Because they are too small to fit an HDD, mobile phones and tablets store the
operating system on a solid-state device.
Operating systems perform several essential functions, including:
Memory management:
Memory management is a crucial aspect of computer systems, particularly operating systems,
that involves the management of a computer's memory resources.
The tasks performed by memory management include the following:
This function involves allocating memory to processes or programs when they request it.
Depending on the allocation strategy
after a process has finished using a portion of memory, the memory manager
deallocates or frees that memory so it can be reused by other processes.
Memory protection mechanisms prevent unauthorized access to memory locations.
In systems with virtual memory, address translation is a critical function. It involves
mapping virtual addresses used by processes to physical addresses in RAM or secondary
storage (e.g., disk).
When a process attempts to access a memory page that is not currently in RAM (e.g.,
due to paging or demand paging), a page fault occurs.
Security management:
Security management involves the systematic approach to managing an organization's security
needs, including the establishment of policies, procedures, and protocols to protect assets,
personnel, and information from various threats.
Effective security management typically involves several key components:
Keeping track of all hardware peripherals deployed within the organization, including
details such as make, model, serial number, and location. Inventory management helps
in asset tracking, maintenance scheduling, and budgeting for replacements or upgrades.
Ensuring that hardware peripherals are compatible with the computer system's
operating system and have the necessary device drivers installed. Regular updates to
device drivers help resolve compatibility issues, improve performance, and enhance
security.
Configuring hardware peripherals to suit the specific needs of users or applications. This
may involve adjusting settings for resolution, print quality, scanning parameters, and
other features to optimize performance and usability.
Implementing regular maintenance schedules to keep hardware peripherals in good
working condition. This includes tasks such as cleaning, calibration, and firmware
updates. Additionally, having procedures in place for troubleshooting common issues
and providing technical support to users ensures minimal disruption to productivity.
Implementing security measures to protect hardware peripherals from unauthorized
access, tampering, or data breaches. This may involve features such as biometric
authentication for printers or encryption for external storage devices to safeguard
sensitive information.
File management:
File management involves the organization, storage, retrieval, and manipulation of digital files in
a systematic and efficient manner. Here are some key aspects of file management:
Structuring files and folders in a logical hierarchy to facilitate easy navigation and
retrieval. This may involve organizing files by project, department, date, or any other
relevant criteria. Creating a consistent naming convention for files can also aid in
organization.
Choosing appropriate storage systems for different types of files based on factors such as
size, access frequency, and security requirements. This could include local storage
devices (e.g., hard drives, SSDs), network-attached storage (NAS), cloud storage services,
or a combination of these.
Implementing regular backup procedures to protect against data loss due to hardware
failure, human error, or malicious activities such as cyberattacks. Backup strategies may
involve scheduled backups to local and remote locations, as well as periodic testing of
recovery processes to ensure their effectiveness.
Managing multiple versions of files to track changes, facilitate collaboration, and prevent
data loss. Version control systems, such as Git, Subversion, or file revision history
features in document management software, help track changes over time and enable
users to revert to previous versions if necessary.
Implementing security measures to control access to files and ensure that only
authorized users have permission to view, edit, or delete them. This typically involves
user authentication mechanisms, access control lists (ACLs), and role-based access
control (RBAC) policies.
Multitasking:
Multitasking refers to the ability to perform multiple tasks or activities simultaneously or in
rapid succession. While the human brain can switch between tasks relatively quickly, true
simultaneous multitasking is limited, and what often appears as multitasking is actually rapid
task-switching. The operating system must continuously check the state of every process under
its control to ensure that multitasking functions well, or that the processes don't conflict with
one another:
Running of applications:
Running applications involves the execution of software programs on a computer system or
device to perform specific tasks or functions. Here are some key aspects of running
applications:
Users typically launch applications by clicking on their respective icons, selecting them
from a menu, or executing a command in the operating system's terminal or command
prompt.
Running applications consume system resources such as CPU (Central Processing Unit),
memory (RAM), storage, and network bandwidth.
Each running application is managed as a separate process by the operating system, with
its own memory space and execution environment.
Modern operating systems support multitasking, allowing multiple applications to run
concurrently or switch rapidly between tasks.
Applications can run in either the foreground, where they have user focus and interact
directly with the user, or the background, where they perform tasks invisibly or with
minimal user interaction.
The operating system will be in charge of the application software, which will require access to
system software, including device drivers, in order to function.
As the software runs, various operating system components might need to be loaded into and
out of RAM.
Interrupts:
Interrupts are signals sent by hardware or software to the CPU (Central Processing Unit) to
temporarily suspend its current execution of instructions and handle a specific event or
NAVID SAQIB : 03334259883 11
CHAP 4 SOFTWARE
condition. Interrupts allow the CPU to respond promptly to external events, such as hardware
device requests, errors, or user inputs, without wasting processing time by continuously polling
for events. Disruptions may result from:
a timing signals
an input/output procedure (like a printer or disk drive that needs additional data)
user involvement (e.g., the system is interrupted when the user pushes a key (or keys)
on a keyboard, such as \CTRL>\ALT>).
a physical issue (like a paper jam in the printer)
Software faults (such as an inaccessible.exe file that prevents a program from running,
two processes attempting to access the same memory region, or an attempt to divide
by zero) can result in issues.
The microprocessor either continues what it was doing after receiving the interrupt signal or
halts to service the device or program that generated the interrupt. Both the sort of interrupt
and its priority level must be determined by the computer.
As an illustration, consider downloading a file from the internet and simultaneously enjoying
some music from a library. These two functions can coexist thanks to interruptions, giving the
user the impression that both are being done at the same time. In actuality, both roles can be
served because data is moved in and out of memory relatively quickly. All of this can be
accomplished by utilizing a buffer, which is a section of memory. A buffer is a section of
memory used to hold data momentarily.
Programming Languages:
High level language: Designed to be easily understandable by humans and often resemble
natural language syntax. Examples include Python, Java, C++, and JavaScript.
Low level language: Closer to machine code and provide more direct control over hardware
resources. Examples include Assembly language and Machine code.
Scripting language: Interpreted languages used for automating tasks, web development, and
system administration. Examples include JavaScript, Python, Ruby, and PHP etc.
Assembly languages:
Assembly language is a low-level programming language that provides a symbolic
representation of machine code instructions, making it easier for humans to understand and
write code for specific hardware architectures. Those programmers who do, do so for the
following reasons:
Translators:
Translators are software tools that convert source code written in a programming language into
machine code or an intermediate representation that can be executed by a computer. There are
several types of translators, each serving a specific purpose in the software development
process. Here are the main types of translators:
A program must be translated into binary before a computer can use it; this is done by a utility
program called a translator.
Compilers:
A compiler translates the entire source code of a program written in a high-level programming
language into machine code or an intermediate representation called object code. The resulting
executable file can be run independently of the compiler. Compilers perform lexical analysis,
syntax analysis, semantic analysis, optimization, and code generation. Examples include GCC
(GNU Compiler Collection), Clang, and Microsoft Visual C++ Compiler.
The high-level program statement:
Interpreters:
Interpreters are software programs that execute source code directly, translating it into machine
code or intermediate code and executing it line by line or statement by statement. Unlike
compilers, which translate entire source code files into machine code or intermediate
representations before execution, interpreters process code in real-time, translating and
executing each line of code as it is encountered.
Assemblers:
Assemblers are software tools used to translate assembly language code into machine code,
which is directly executable by a computer's CPU (Central Processing Unit). Assembly language
is a low-level programming language that provides a symbolic representation of machine code
instructions, making it easier for programmers to write code for specific hardware architectures.
The program statements written in assembly language are:
Comparing translators:
Interpreter Compiler
Interpreted languages offer rapid prototyping Compiled programs tend to have better
and development cycles due to the performance since the translation process
immediate feedback loop. optimizes the code.
Code can be executed directly without the Errors are detected before execution,
need for compilation, making it easier to reducing runtime errors.
write and debug.
Interpreted languages are typically more The generated executable is portable and can
portable since the interpreter abstracts away be distributed without requiring the source
hardware differences. code.