0% found this document useful (0 votes)
22 views56 pages

Arch Lecture 2 CSS 122 Mzumbe

The document provides an overview of software and operating systems, detailing the distinction between software (intangible) and hardware (tangible). It categorizes software into system software, application software, open source, and proprietary software, explaining their functions and examples. Additionally, it discusses the evolution of operating systems from serial processing to time-sharing systems, highlighting key concepts such as resource management, program execution, and user interfaces.

Uploaded by

deowelsaguge
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views56 pages

Arch Lecture 2 CSS 122 Mzumbe

The document provides an overview of software and operating systems, detailing the distinction between software (intangible) and hardware (tangible). It categorizes software into system software, application software, open source, and proprietary software, explaining their functions and examples. Additionally, it discusses the evolution of operating systems from serial processing to time-sharing systems, highlighting key concepts such as resource management, program execution, and user interfaces.

Uploaded by

deowelsaguge
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 56

Introduction to

software and
Operating Systems
CSS 122
Software &
Hardware
•Computer Instructions or data, anything that can be stored
electronically is Software.
•Hardware is one that is tangible. The storage devices (Hard
disk, CD’s etc.,), mouse, keyboard CPU and display devices
(Monitor) are Hardware.
•For example: There is a problem in the Software implies –
Problem with program or data
Types of
Software
System Software
Application Software

Open source Software and


Proprietary Software
System
Software
• System Software includes the Operating System and all
the utilities that enable the computer to function.
•System software is a term referring to any computer software
which manages and controls the hardware so that application
software can perform a task.
Example:
Operating Systems, Compiler, Loader, Linker, Interpreter
Application
Software
• Application Software includes programs that do real work
for user.
Example:
• Payroll systems, Inventory Control, Manage student database,
Word Processor, Spreadsheet and Database Management System
etc.,
Open Source
Software
• Open source software is computer software whose source
code is available under a license that permits users to use,
change, and improve the software, and to redistribute it in
modified or unmodified form.
•It is often developed in a public, collaborative manner.
•Well-known Open sourse software products are Linux, Netscape,
Apache, etc.,
Proprietary
Software:
•Proprietary software (also called non-free software) is software
with restrictions on using, copying and modifying as enforced by
the proprietor. Restrictions on use, modification and copying is
achieved by either legal or technical means and sometimes both.
•Proponents of proprietary software are Microsoft.
•Ex: CAD, Nortan Antivirus etc.,
System Software-Operating
System
•Operating System is a software, which makes a computer to actually
work.
•It is the software the enables all the programs we use.
•The OS organizes and controls the hardware.
•OS acts as an interface between the application programs and the
machine hardware.
•Examples: Windows, Linux, Unix and Mac OS, etc.,
System Software-
Compiler
•Compiler: A compiler is a special program that translates a
programming language's source code into machine code,
bytecode or another programming language.
• The source code is typically written in a high-level, human-
readable language such as Java or C++.
•Compilers that translate source code to machine code target
specific operating systems and computer architectures
System Software-
Loader
Loader: A loader is the part of an operating system that is responsible for
loading programs into memory, preparing them for execution and then
executing them.
The loader is usually a part of the operating system's kernel and usually
is loaded at system boot time and stays in memory until the system is
rebooted, shut down, or powered off.
In Unix, the loader is the handler for the system call execve().
System Software-
Linker
•Linker: A linker or link editor is a program that takes one or more
objects generated by compilers and assembles them into a single
executable program.
•Linkers can take objects from a collection called a library. The
objects are program modules containing machine code and
information for the linker.
•The linker takes care of arranging the objects in a program's
address space.
System Software-
Interpreter
•Interpreter: An interpreter is a computer program that
translates and executes instructions written in a computer
programming language line-by-line, unit by unit etc.,
•An interpreter needs to be able to analyze, or parse,
instructions written in the source language.
Application
Software
• Word Processors
• Spreadsheets
• Graphic Presentations
•Database Management System (DBMS)
Operating System
Overview
Operating
System
•A program that controls the execution of application programs
•An interface between applications and hardware

Main objectives of an OS:

• Convenience
• Efficiency
• Ability to evolve
The OS as a User/Computer
Interface
The OS as a User/Computer
Interface Cont.
•The hardware and software used in providing applications to a user
can be viewed in a layered fashion
•Thus, the end user views a computer system in terms of a set of
applications.
•An application can be expressed in a programming language, and is
developed by an application programmer
•Considering the complexity of managing the computer hardware to
develop an application could e overwhelmingly complex
•To ease this chore, a set of system programs is provided
The OS as a User/Computer
Interface Cont.
•Some of the system programs are referred to as utilities, or library
programs
•They implement frequently used functions that assist in program
creation, the management of files, and the control of I/O
devices
•A programmer use them to develop program
•Application when running invoke these utilities to perform certain
functions
•The most important collection of system programs comprises the
Operating System (OS)
Operating System
Services
•Program development
•Program execution
•Access I/O devices
•Controlled access to files
•System access
•Error detection and response
•Accounting
•Security and Protection
•Resource allocation
Program
development
•The OS provides a variety of facilities and services, such as
editors and debuggers, to assist the programmer in creating
programs
•Typically, these services are in the form of utility programs
•If they are not supplied with the OS, are referred to as
application program development tools
Program
execution
•A number of steps need to be performed to execute a
program.
•Instructions and data must be loaded into main memory, and
I/O devices must be initialized, and other resources must be
prepared.
•The OS handles these scheduling duties for the user.
Access to I/O
devices
•Each I/O device requires its own peculiar set of instructions
or control signals for operation.
• The OS provides a uniform interface that hides these
details so programmers can access such devices using
simple reads and writes
Controlled access
to files
•The OS must reflect a detailed understanding of not only the
nature of the I/O device (disk drive, tape drive), but also the
structure of the data contained in the files on the storage
medium.
•In the case of a system with multiple users, the OS may provide
protection mechanisms to control access to the files.
System
access
•For shared or public systems, the OS controls access to the
system as a whole and to specific system resources.
•The access function must provide protection of resources
and data from unauthorized users, and must resolve conflicts
for resource contention.
Error detection and
response
• A variety of errors can occur while a computer system is running.
• These include internal and external hardware errors
memory error
device failure or malfunction
• Software errors
division by zero
attempt to access forbidden memory location,
 inability of the OS to grant the request of an application
• In each case, the OS must provide a response that clears the error
condition with the least impact on running applications.
Resource allocation

• The processes running in the system require


resources to complete their execution.
When multiple processes are running in the system
concurrently then the resources should be equally
allocated to every process running in the system.
The operating system uses CPU scheduling to
allocate resources effectively among the processes
ensuring better utilization of the CPU.
The resources used by the processes can be CPU
cycles, primary memory storage, file storage, and I/O
devices
Accounti
ng
•A good OS will collect usage statistics for various resources and
monitor performance parameters such as response time.
•On any system, this information is useful in anticipating the need for
future enhancements and in tuning the system to improve
performance.
•On a multiuser system, the information can be used for billing
purposes.
view of operating system
services
Key
Interfaces
•Instruction set architecture (ISA)
The ISA defines the collection of machine language instructions that a
computer can follow
•Application binary interface (ABI)
The ABI defines a standard for binary portability across programs.
•Application programming interface (API)
API gives program access to the hardware resources and services
available in a system through the user ISA supplemented with
high-level language (HLL) library calls.
The Operating System as Resource
Manager
The Operating System as a
Resource Manager
•A computer is a set of resources for moving, storing, &
processing data
•The OS is responsible for controlling the use of a
computer’s resources, such as I/O, main and secondary
memory, and processor execution time.
•The OS exercises its control through software
Operating System as
Software
•Functions in the same way as ordinary computer
software
•Program, or suite of programs, executed by the
processor
•Frequently relinquishes control and must depend on
the processor to allow it to regain control
Evolution of Operating
Systems
•A major OS will evolve over time for a number
reasons:
of Hardware upgrades

New types of hardware

New services

Fixes
Evolution of Operating
Systems

Time Sharing Systems

Multiprogrammed Batch Systems

Simple Batch Systems

Serial Processing
Evolution of Operating System:

First Generation: 1945-1955. Serial processing systems


Earlier mechanical systems large machines whose parts were
manually handled by workers.
The committed an error by a person often lead to problems.
Thus electronic machines were introduced to do the work.
Though these machines did not use an OS at all still this phase
is regarded as the beginning of the Operating Systems era.
The calculation speed in these machines was limited and still
errors could occur if there was any error in the instruction
provided to the machine. These systems were referred to as
serial processing systems.
Serial
Processing
Earliest Computers: Problems:
• No operating system • Scheduling:
 programmers interacted directly with the most installations used a hardcopy sign-
computer hardware up sheet to reserve computer time
• Computers ran from a console with time allocations could run short
display lights, toggle switches, some or long, resulting in wasted
form of input device, and a printer computer time
• Users have access to the computer • Setup time
in “series” a considerable amount of time was
spent just on setting up the program to
run
Second Generation: 1955 to 1965 Batch Systems

These were known as batch operating systems as the jobs to be done


were supplied in a batch to the machine.
A Batch referred to a set of similar tasks or jobs.
Job Control Language was used to create the instructions to execute
the job. The instructions were punched on a card which was then
loaded onto a tape that had several such cards and then it was finally
sent to the processor.
maximum efficiency could be obtained.
If an error occurred during a particular job, then the job needs to be
restarted again.
These systems made it possible to execute multiple jobs on a single
machine and laid the foundation for multitasking.
These systems had a drawback in that when the I/O operations were
carried out, the processor had to remain idle.
Simple Batch
Systems
•Early computers were very expensive
important to maximize processor utilization
•Monitor
user no longer has direct access to processor
job is submitted to computer operator who batches them
together and places them on an input device
program branches back to the monitor when finished
Monitor Point of
View
•Monitor controls the sequence of
events
•Resident Monitor is software
always in memory
•Monitor reads in job and gives
control
•Job returns control to monitor
Processor Point of
View
•Processor executes instruction from the memory containing the
monitor
•Executes the instructions in the user program until it encounters
an ending or error condition
•“control is passed to a job” means processor is fetching and
executing instructions in a user program
•“control is returned to the monitor” means that the processor is
fetching and executing instructions from the monitor program
Job Control Language
(JCL) Special type of programming
language used to provide
instructions to the monitor

what compiler to use

what data to use


Modes of
Operation

User Mode Kernel Mode


• user program executes in user • monitor executes in kernel mode
mode • privileged instructions may be
• certain areas of memory are executed
protected from user access • protected areas of memory may
• certain instructions may not be be accessed
executed
Simple Batch System
Overhead
•Processor time alternates between execution of user
programs and execution of the monitor
•Sacrifices:
some main memory is now given over to the monitor
some processor time is consumed by the monitor
•Despite overhead, the simple batch system improves utilization
of the computer.
Third Generation: 1965-1980 Multi-programmed batched systems.
 These systems were very similar to the batched operating systems.
These systems had the ability of multitasking and multiprogramming
where the tasks of multiple users could be run simultaneously.
Users could connect to the machine and submit their tasks through an
online terminal.
The OS held all the tasks in the main memory and managed the tasks
to be executed using various scheduling algorithms such as FCFS, SJF,
LJF, etc.
This also ensured that the tasks or jobs do not suffer
from starvation
Uniprogram
ming
•The processor spends a certain amount of time executing,
until it reaches an I/O instruction; it must then wait until that
I/O instruction concludes before proceeding
Multiprogram
ming
•There must be enough memory to hold the OS (resident
monitor) and one user program
•When one job needs to wait for I/O, the processor can switch
to the other job, which is likely not waiting for I/O
Multiprogram
ming

•Multiprogramming
also known as multitasking
memory is expanded to hold three, four, or more
programs and switch among all of them
Multiprogramming
Example
Effects on Resource
Utilization
Utilization
Histograms
Fourth Generation: 1980 onwards Time-Sharing
Systems

Development of computer networking and various


networking protocols.
Allowed the users to know the existence of other users on
the network.
Use of a Graphical User Interface (GUI) which made it very
easy to interact with the operating system and in turn with
the hardware.
Time-shared operating systems and the Macintosh operating
systems.
In other operating systems if many users, some tasks took too long to
get completed. This lead to starvation of processes or jobs.

Time-shared operating systems solved this problem, use of scheduling


algorithms such as Round Robin in which the work of a user was done
for a specific time and then the OS moved to the next job.

These OS shared the time between multiple users and hence got the
name Time Shared Operating Systems.
Time-Sharing
Systems
•Can be used to handle multiple interactive jobs
•Processor time is shared among multiple users
•Multiple users simultaneously access the system through
terminals, with the OS interleaving the execution of each
user program in a short burst or quantum of computation
Compatible Time-Sharing
Systems
•One of the first time-sharing operating systems
• Developed at MIT by a group known as Project MAC
• Ran on a computer with 32,000 36-bit words of main
memory, with the resident monitor consuming 5000 of that
• To simplify both the monitor and memory management a
program was always loaded to start at the location of the 5000th
word
Batch Multiprogramming vs.
Time Sharing
Major
Advances
•Operating Systems are among the most complex pieces of
software ever developed
•Major advances in development include:
•Processes
•Memory management
•Information protection and security
•Scheduling and resource management
•System structure

You might also like