ch#4 (O I.ii) 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

UNIT 4

1
 Eng. Majida Noorani
 B.E from QUEST, Nawabshah (13
batch)
 Email: majidanoorani48@gmail.com

2
 4.1 Types of software and interrupts
4.1.1 System software and application software
4.1.2 Operating systems
4.1.3 Running of applications
4.1.4 Interrupts
 4.2 Types of programming language, translators and integrated
development environments (IDEs)
4.2.1 High-level languages and low-level languages
4.2.2 Assembly languages
4.2.3 Translators
4.2.4 Advantages and disadvantages of compilers and interpreters
4.2.5 Integrated Development Environment (IDE)

3
TOPIC

4
5
6
 System software refers to a type of computer
program designed to facilitate the operation and
management of computer hardware and provide a
platform for running application software.
 It includes
Operating Systems
Device Drivers
Utility Programs
and other software components necessary for the
functioning of a computer system

7
1. Operating Systems (OS): The core component of system
software, an operating system manages computer
hardware resources and provides services to application
software. Examples include Windows, macOS, Linux, and
Unix.
2. Device Drivers: These are software programs that allow
the operating system to communicate with hardware
devices such as printers, keyboards, mice, and graphics
cards. Device drivers enable these hardware components
to function properly with the operating system.
3. Utility Programs: These are tools designed to perform
specific tasks related to system management,
optimization, and maintenance. Examples include
antivirus software, disk cleanup tools, file management
utilities, and backup software

8
4. Language Translators: Compilers and interpreters are essential
system software that translate high-level programming
languages into machine code that the computer can execute.
Compilers translate entire programs at once, while interpreters
translate code line-by-line as it is executed.
5. System Libraries: These are collections of pre-written code
that provide standard functions and procedures to application
developers. System libraries simplify programming tasks by
offering commonly used functionalities, such as mathematical
operations, input/output operations, and data manipulation.
6. Firmware: Firmware is a type of software that is embedded
into hardware devices during manufacturing. It provides low-
level control over the device's hardware components and is
responsible for booting the device and initializing its hardware
before the operating system takes over.
The BIOS is often referred to as firmware. Firmware is defined
as a program that provides low level control for devices

9
 Application software refers to computer programs or
software applications designed to perform specific
tasks or functions for end-users
 There are countless types of application software,
serving various purposes and catering to diverse user
needs. Some common categories of application
software include
1. Productivity Software: Tools designed to enhance
productivity and facilitate tasks such as word
processing, spreadsheet management, presentations,
and note-taking. Examples include Microsoft Office
(Word, Excel, PowerPoint), Google Workspace
(Docs, Sheets, Slides), and LibreOffice

10
2. Graphics and Multimedia Software: Applications for
creating, editing, and manipulating images, videos, and
audio files. Examples include Adobe Photoshop (image
editing), Adobe Premiere (video editing), and Audacity
(audio editing).
3. Internet and Communication Software: Programs for
accessing the internet, browsing websites, sending emails,
and communicating with others online. Examples include
web browsers (Chrome, Firefox, Safari), email clients
(Outlook, Gmail), and instant messaging applications
(WhatsApp, Slack).
4. Entertainment Software: Software designed for leisure
and entertainment purposes, such as video games,
multimedia players, and streaming services. Examples
include Steam (gaming platform), Spotify (music
streaming), and Netflix (video streaming).

11
5. Educational Software: Applications designed to aid learning and
education, including interactive tutorials, educational games, and
virtual learning environments. Examples include Duolingo (language
learning), Khan Academy (educational videos), and Moodle (learning
management system).
6. Business Software: Software applications tailored for business
operations, including accounting software, customer relationship
management (CRM) systems, enterprise resource planning (ERP)
software, and project management tools. Examples include
QuickBooks (accounting), Salesforce (CRM), SAP (ERP), and Trello
(project management).
7. Utility Software: Tools designed to perform specific utility tasks,
such as file compression, system optimization, backup, and security.
Examples include WinRAR (file compression), CCleaner (system
optimization), and Norton Antivirus (security)

12
TOPIC

13
14
 An operating system (OS) is a software component
that acts as an intermediary between computer
hardware and application software.
 It manages computer hardware resources and
provides a platform for running software
applications.

15
Examples of popular operating systems include:
 Microsoft Windows: Widely used in personal
computers (e.g., Windows 10) and servers (e.g.,
Windows Server).
 MacOS: Developed by Apple Inc. for Macintosh
computers.
 Linux: A free and open-source OS kernel used in
various distributions (distros) like Ubuntu, Fedora, and
Debian.
 Unix: A family of multitasking, multiuser computer
operating systems, including various commercial and
open-source variants

16
The primary functions of an operating system include
 Process Management: The operating system oversees the
execution of processes (programs in execution) on the
computer. It allocates CPU time to different processes,
manages process scheduling, and facilitates inter-process
communication.
 Memory Management: Operating systems manage a
computer's memory resources, including RAM (random-
access memory) and virtual memory. They allocate memory
to processes, handle memory swapping between RAM and
disk storage, and ensure efficient memory usage.
 File System Management: Operating systems organize and
manage files stored on disk drives. They provide file system
interfaces for creating, reading, writing, and deleting files,
as well as managing directories and file permissions.

17
 Device Management: Operating systems control hardware devices
connected to the computer, such as keyboards, mice, printers, storage
devices, and network interfaces. They provide device drivers to
communicate with hardware devices and manage input/output operations.
 User Interface: Operating systems provide user interfaces through which
users interact with the computer system. This can include graphical user
interfaces (GUIs), command-line interfaces (CLIs), or touch-based
interfaces, depending on the OS and the device.
 Security and Access Control: Operating systems enforce security
policies to protect the system from unauthorized access, viruses,
malware, and other security threats. They manage user authentication,
permissions, and access control mechanisms.
 Networking: Operating systems include networking functionality to
enable communication between computers and networked devices. They
provide network protocols, services, and utilities for transmitting data
over networks

18
 Human computer interface (HCI): The human computer interface
(HCI) is in the form of a Command Line Interface (CLI) or a Graphical
User Interface (GUI). A CLI requires a user to type in instructions in
order to choose options from menus, open software, etc. There are often a
number of commands that need to be typed in, for example, to save or
load a file. A GUI allows the user to interact with a computer (or MP3
player, gaming device, mobile phone, etc.) using pictures or symbols
(icons) rather than having to type in a number of commands
 Running of application: Running applications refers to the process by
which software programs are executed on a computer system i-e When a
computer starts up, part of the operating system needs to be loaded into
RAM, this is known as booting up the computer (or a bootstrap loader).

19
 Multitasking: Multitasking allows computers to carry out more than one
task (i.e. a process) at a time. Each of the processes will share the
hardware resources under the control of the operating system software.

20
Interrupts:
 Interrupts are a fundamental mechanism in
computer systems that allow the operating system
(OS) or other software to respond to events and
signals from hardware or software components.
 When an interrupt occurs, it temporarily suspends
the currently executing program or task and
transfers control to a special piece of code called
an interrupt handler or interrupt service routine
(ISR).
 Interrupts play a crucial role in multitasking,
allowing the system to handle multiple tasks
concurrently and respond quickly to events
without wasting CPU cycles
21
Interrupts can be caused by:
1. A timing signal
2. An input/output process (for example, a disk drive or
printer requiring more data)
3. A hardware fault (for example, a paper jam in the
printer)
4. User interaction (for example, the user presses a key
(or keys) on a keyboard, such as , which causes the
system to be interrupted)
5. Software errors that cause a problem (for example,
an .exe file that cannot be found to initiate the
execution of a program, two processes trying to
access the same memory location, or an attempt to
divide by zero)

22
Types of Interrupts:
 Hardware Interrupts: These are signals generated by hardware
devices to indicate events such as I/O completion, timer expiration, or
hardware errors.
 Software Interrupts: Also known as traps or exceptions, these are
signals generated by software to request specific services from the
operating system, such as system calls or error handling.

23
 Interrupt Handling Process:
 When an interrupt occurs, the processor saves the current
state of the executing program (context) and transfers
control to the corresponding interrupt handler.
 The interrupt handler performs the necessary actions to
handle the interrupt, which may involve servicing the
hardware device, processing data, or responding to the
software request.
 After handling the interrupt, the processor restores the saved
context and resumes execution of the interrupted program.
 Interrupt Prioritization:
 Some systems support multiple interrupt sources with
varying priorities. In such cases, interrupts may be
prioritized to ensure that critical events are handled
promptly.
 Priority levels can be assigned to different types of
interrupts, allowing higher-priority interrupts to preempt
lower-priority ones.

24
TOPIC

25
 High-level language and low-level language are terms
used to categorize programming languages based on
their level of abstraction and proximity to machine
code

26
 High-level languages are designed to be more
human-readable and easier to understand by
programmers. They use natural language
constructs and are closer to human languages.
 These languages abstract away much of the
complexity of computer hardware and provide
features like variables, data structures, and
functions.
 Examples of high-level languages include Python,
Delphi, Java, Pascal, C++, Visual Basic and
JavaScript

27
 Low-level languages are closer to the hardware and are
less abstracted than high-level languages. They
typically closely represent the architecture of the
underlying machine.
 These languages provide little abstraction from the
hardware and require a deeper understanding of
computer architecture.
 Low-level languages are usually used for tasks where
precise control over hardware resources is required,
such as system programming, device drivers, and
embedded systems development.
 Examples of low-level languages include assembly
language and machine code

28
29
TOPIC

30
 Assembly language is a low-level programming language that
provides a symbolic representation of machine code instructions.
 It is specific to the architecture of the computer's processor and
allows programmers to write code that directly controls the
hardware resources of a computer system.

Symbolic
Representation

Debugging and Close to


Maintenance Hardware

Use Cases Platform


Specific

Lack of
Abstraction

31
 Symbolic Representation: Assembly language uses
symbolic representations of machine instructions, making it
easier for programmers to understand and write compared to
raw machine code. Each assembly language instruction
corresponds to a specific machine operation, such as
moving data, performing arithmetic operations, or
controlling program flow.
 Close to Hardware: Programmers have direct control over
the processor, memory, and other hardware components.
This level of control allows for highly efficient and
optimized code but requires a deep understanding of
computer architecture.
 Platform Specific: Assembly language is specific to the
processor architecture of the target system. Code written in
assembly language for one type of processor may not run on
another type without modification.

32
 Lack of Abstraction: Unlike high-level languages, which
provide abstractions like variables, functions, and data
structures, assembly language requires programmers to
manage these concepts manually. This lack of abstraction
means that programming in assembly language can be more
challenging and time-consuming.
 Use Cases: Assembly language is commonly used in
situations where performance, efficiency, or direct hardware
control are critical. Examples include writing device drivers,
operating systems, real-time systems, and certain parts of
performance-critical applications.
 Debugging and Maintenance: Assembly language
programs can be more challenging to debug and maintain
compared to high-level languages. Errors can be harder to
identify, and the code may be less portable across different
hardware platforms

33
34
TOPIC

35
36
TOPIC

37
38
TOPIC

39
 An Integrated Development Environment (IDE) is a
software application that provides comprehensive
facilities to computer programmers for software
development
IDEs usually have these features:
1. Code editors
2. A translator
3. A runtime environment with a debugger
4. Error diagnostics
5. Auto-completion
6. Auto-correction
7. An auto-documenter and prettyprinting
40
1. Code editors: A code editor with
features such as syntax highlighting,
code completion, and automatic
indentation to facilitate writing and
editing code.
2. A translator(Compiler/Interpreter
Integration): IDEs often include
integration with compilers or
interpreters for various programming
languages, allowing developers to
compile and run their code directly
from the IDE.
3. A runtime environment with a
debugger: Built-in debuggers that allow
developers to set breakpoints, inspect
variables, and step through code
execution to identify and fix bugs.

41
4. Error diagnostics & Auto-correction: Dynamic error
checking finds possible errors as the program code is
being typed, alerts the programmer at the time and
provides a suggested correction. Many errors can
therefore be found and corrected during program
writing and editing before the program is run

5. Auto-completion: Code editors can offer context-


sensitive prompts with text completion for variable
names and reserved words
42
6. An auto-documenter and prettyprinting: IDEs
can provide an auto-documenter to explain the
function and purpose of programming code.
Most code editors color code the words in the
program and lay out the program in a meaningful
way – this is called pretty-printing.

43
44

You might also like