0% found this document useful (0 votes)
10 views234 pages

PPS UNIT 1

The document covers the fundamentals of programming languages, differentiating between high-level and low-level languages, and explaining the roles of translators such as compilers, assemblers, and interpreters. It also discusses system software versus application software, including the functions of linkers and loaders, and provides an overview of operating systems and their various types. Key concepts include the characteristics and objectives of different generations of programming languages and the operational principles of various operating systems.

Uploaded by

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

PPS UNIT 1

The document covers the fundamentals of programming languages, differentiating between high-level and low-level languages, and explaining the roles of translators such as compilers, assemblers, and interpreters. It also discusses system software versus application software, including the functions of linkers and loaders, and provides an overview of operating systems and their various types. Key concepts include the characteristics and objectives of different generations of programming languages and the operational principles of various operating systems.

Uploaded by

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

Programming for Problem Solving (BCS 101/BCS 202)

UNIT-1 : Introduction to components of computer system


Lec-3

Today’s Target
High level language and low level language
Translator and its types. By Pragya Rajvanshi
Programming language and its type.
B.Tech M.tech (C.S.E.)
Ques) Differentiate between high level and low level programming languages. (2021-22)

High level language low level language

It is programmer friendly language. It is a machine friendly language.


It is easy to understand. It is tough to understand.
It is simple to debug It is complex to debug comparatively.
It is simple to maintain It is complex to maintain comparatively.
It is portable. It is non-portable.
It can run on any platform. It is machine-dependent.
It needs compiler or interpreter for It needs compiler or interpreter for
translation translation.
High level language is less memory Low level language is high memory efficient.
efficient.
Ques) What do you mean by translator? Explain Assembler, compiler and
interpreter.(2017-18)(2018-19)

Translators:
 A program written in high-level language is called as source code.
 To convert the source code into machine code, translators are needed.
 A translator takes a program written in source language as input and converts it
Low level language is high memory efficient.
into a program in target language as output.
 It also detects and reports the error during translation.
Ques) What do you mean by translator? Explain Assembler, compiler and
interpreter.(2017-18)(2018-19)

Roles of translator:
1. Translating the high-level language program input into an equivalent machine
language program.
2. Providing diagnostic messages wherever the programmer violates specification
of the high-level language program
Ques) What do you mean by translator? Explain Assembler, compiler and
interpreter.(2017-18)(2018-19)
Compiler Assembler Interpreter

Compiler is a translator which is Assembler is a translator which  Interpreter is a translator which


used to convert programs in high- is used to translate the assembly is used to convert programs in

level language to low-level language code into machine high-level language to low-level

language language language.


 Interpreter translates line by line
and reports the error once it
It translates the entire program
encountered during the
and also reports the errors in
translation process.
source program encountered
 It gives better error diagnostics
during the translation.
than a compiler
Ques) What do you mean by translator? Explain Assembler, compiler and
interpreter.(2017-18)(2018-19)

Compiler Assembler Interpreter


Ques) What do you mean by programming languages? Explain different types of
programming languages. (2020-21)

Computer Program:
 A program is a set of instructions following the rules of the chosen
language.
Programming Language:
 A vocabulary and set of grammatical rules (syntax) for instructing a
computer to perform specific tasks.
 Programming languages can be used to create computer programs.
 The term programming language usually refers to high-level languages,
such as C, C++,JAVA.
Ques) What do you mean by programming languages? Explain different types of
programming languages. (2020-21)

Generations of Programming Language:


 So far Five Generations of programming languages have been defined.
 A brief introduction of each of the five generations is given below
Ques) What do you mean by programming languages? Explain different types of
programming languages. (2020-21)

First Generation Programming Language (1GL):


 First generation of programming language refers to machine language.
 Machine language is lower level language is the combination of binary
digits.
 These languages directly talk to hardware. While easily understood by
computers, machine languages are almost impossible for humans to use
because they consist entirely of numbers.
 Programs written in machine language are not portable.
Ques) What do you mean by programming languages? Explain different types of
programming languages. (2020-21)
Ques) What do you mean by programming languages? Explain different types of
programming languages. (2020-21)

Second Generation Programming Language (2GL):


 Second generation of languages is also low level language which is known as
assembly language.
 A program written in assembly language consists of a series of instructions
mnemonics (much like English) that correspond to a stream of executable
instructions.
Ques) What do you mean by programming languages? Explain different types of
programming languages. (2020-21)

 Programs written in machine language are not portable. The problem is that
the computer doesn't understand the assembly code, so we need a way to
convert it to machine code using assembler.

 Example: Machine language: 10110000 01100001


Assembly language: mov a1, 91
Ques) What do you mean by programming languages? Explain different types of
programming languages. (2020-21)

Third Generation Programming Language (3GL):


 Third Generation programming languages are High level Programming
languages.
 They allow us to write computer code using instructions resembling everyday
spoken language (for example: print, if, while) which are then translated into
machine language to be executed.
 Programs written in a high level language need to be translated into machine
language before they can be executed.
Ques) What do you mean by programming languages? Explain different types of
programming languages. (2020-21)

Third Generation Programming Language (3GL):

 Some programming languages use a compiler to perform this translation and


others use an interpreter.
 Programs written in high level languages are portable
Ques) What do you mean by programming languages? Explain different types of
programming languages. (2020-21)

Objectives of high-level languages:

➢ To relieve the programmer of the tedious task of writing programs in


machine language and assembly languages.

➢ To provide programs that can be used on more than one type of machine
with very few changes.

➢ To allow the programmer more time to focus on understanding the user’s


needs and designing the software required meeting those needs. Examples
of High-level Language: C, C++, JAVA, PHYTON
Ques) What do you mean by programming languages? Explain different types of
programming languages. (2020-21)
Fourth Generation Programming Language (4GL):
General characteristics of 4GL are:
a) Closer to human languages
b) Portable
c) Simple and requires less effort than 3GL
Ques) What do you mean by programming languages? Explain different types of
programming languages. (2020-21)

Objectives of fourth generation languages:


1. Increasing the speed of developing programs and minimizing user effort to
obtain information from computer.

2. Decreasing the skill level required of users so that they can concentrate on the
application rather than coding, and thus solves their own problems without the
help of a professional programmer.
Ques) What do you mean by programming languages? Explain different types of
programming languages. (2020-21)

Fifth Generation Programming Language (5GL):

 Natural Languages represent the next step in the development of programming


languages; the text of a natural language statement very closely resembles
human speech.
 These languages are also designed to make the computer “smarter”.
 Languages used for writing programs for Artificial Intelligence and come under
5GL
Ques) Differentiate between compiler and interpreter.(2017-18), (2018-19),
(2019-20),(2020-21)

COMPILER INTERPRETER
It takes an entire program at a time. It takes a single line of code or instruction at a time.

It generates intermediate object code. It does not produce any intermediate object code.

The compilation is done before execution. Compilation and execution take place simultaneously.

Comparatively faster Slower

Memory requirement is more due to the creation of object It requires less memory as it does not create intermediate
code. object code.
Display all errors after compilation all at the same time. Displays error of each line one by one.

Difficult Easier comparatively

C, C++, C# PHP, Perl, Python, Ruby


Download Gateway Classes Application
From Google Play store

Link in video Description


Programming for Problem Solving (BCS 101/BCS 202)

UNIT-1 : Introduction to components of computer system


Lec-4

Today’s Target
 What is System software and application software.
 What is Linker and Loader.
By Pragya Rajvanshi

B.Tech M.tech (C.S.E.)


2 years + experience
What is system software?

 System Software is a set of programs that control and manage the operations
of computer hardware.
 It also helps application programs to execute correctly.
 System Software are designed to control the operation and extend the
processing functionalities of a computer system.
 System software makes the operation of a computer more fast, effective, and
secure.
 Example: Operating system
What is system software?

Features of System Software:

 System Software is closer to the system


 Generally written in a low-level language
 The system software is difficult to design and understand
 Fast in speed
 Less interactive
 Smaller in size
 Hard to manipulate
What is an Application Software?

 Application Software is a program that does real work for the


user.
 It is mostly created to perform a specific task for a user.
 Application Software acts as a mediator between the end-user
and System Software.
 It is also known as an application package.
What is an Application Software?

 It is a user-specific and is designed to meet the requirements of


the user.
 Example: Word-processing software Spreadsheet software
Database software Graphics software Education software
Entertainment software
What is an Application Software?

Features of Application Software:

 Perform more specialized tasks like word processing, spreadsheets,


email, photo editing, etc.
 It needs more storage space as it is bigger in size.
 Easy to design and more interactive for the user.
 Generally written in a high-level language.
Difference between system software and application software.
Difference between system software and application software.
What is Linker? (2019-20) (2020-21)

 It is a computer program that takes one or more object files


generated by a compiler and combines them into one, executable
program. Computer programs are usually made up of multiple
modules that span separate object files, each being a compiled
computer program..
What is Loader ? (2019-20),(2020-21)

 Loader is the program of the operating system which loads the


executable from the disk into the primary memory (RAM) for
execution. It allocates the memory space to the executable module in
main memory and then transfers control to the beginning instruction
of the program.
Difference between linker and loader (2019-20),(2020-21)
Download Gateway Classes Application
From Google Play store

Link in video Description


Programming for Problem Solving (BCS 101/BCS 202)

UNIT-1 : Introduction to components of computer system


Lec-5

Today’s Target
 What is operating System.
 Types of operation system.
By Pragya Rajvanshi

B.Tech M.tech (C.S.E.)


2 years + experience
Ques) What do you mean by operating system? Explain different types of operating
systems.

Operating System:
 It is system software that performs all the basic tasks like managing file, process,
and memory.
 Operating system acts as manager of all the resources, i.e. resource manager.
 Operating system becomes an interface between user and machine.
Ques) What do you mean by operating system? Explain different types of operating
systems.
Ques) What do you mean by operating system? Explain different types of operating
systems.

Types of Operating Systems:

Batch Operating System:


 This type of operating system does not interact with the computer directly.
 There is an operator which takes similar jobs having same requirement and
group them into batches.
 It is the responsibility of operator to sort the jobs with similar needs.
Ques) What do you mean by operating system? Explain different types of operating
systems.
Ques) What do you mean by operating system? Explain different types of operating
systems.

Multiprogramming OS:
 In a multiprogramming system there are one or more programs loaded in main
memory which are ready to execute.
 Only one program at a time is able to get the CPU for executing its instructions
while all the others are waiting their turn.
 The main idea of multiprogramming is to maximize the use of CPU time.
Ques) What do you mean by operating system? Explain different types of operating
systems.

Multiprogramming OS:
 Suppose the currently running process is performing an I/O task; OS may
interrupt that process and give the control to one of the other in-main-memory
programs that are ready to execute. In this way, no CPU time is wasted by the
system waiting for the I/O task to be completed.
Ques) What do you mean by operating system? Explain different types of operating
systems.
Ques) What do you mean by operating system? Explain different types of operating
systems.

Multitasking OS:
 Multitasking means working on multiple tasks simultaneously, such as using your
computer while listening to music.
 Also, using a browser, search for something on the internet and create a word
document that is your assignment.
 It appears that all of the tasks are taking place at the same time.
 It is not all of the tasks happening simultaneously; the processor moves between
them at such a fast pace that we believe they are happening simultaneously.
Ques) What do you mean by operating system? Explain different types of operating
systems.

 Multitasking is similar to multiprogramming in that the CPU is assigned to a


process for a specified period of time, i.e., 'Time quantum or time slice',
after which the CPU 'Context switches' to another process.
 It runs various programs at the same time.
 The PC requires a huge memory to execute multitasking (RAM or ROM).
 Its primary goal is to improve the timing of the CPU's response.
 Users can engage with the system during multitasking, for example, by
typing a letter while the printing process is running.
Ques) What do you mean by operating system? Explain different types of operating
systems.

 Multitasking is a highly complicated system. It is based on the time slice


principle, which assigns a fixed amount of time to each activity to be
completed.
 It is especially useful when a program requires a high level of parallelism.
 It provides a set amount of time for each program to run.
Ques) What do you mean by operating system? Explain different types of operating
systems.
Ques) What do you mean by operating system? Explain different types of operating
systems.

Multiprocessing OS:

 Multiprocessing refers to the hardware (i.e., the CPU units) rather than the
software (i.e., running processes).
 If the underlying hardware provides more than one processor then that is
multiprocessing.
 Several variations on the basic scheme exist, e.g., multiple cores on one die or
multiple dies in one package or multiple packages in one system.
 A system can be both multiprogrammed by having multiple programs running at
the same time and multiprocessing by having more than one physical processor.
Ques) What do you mean by operating system? Explain different types of operating
systems.
Ques) What do you mean by operating system? Explain different types of operating
systems.

Multithreading OS:
 Multithreading is an execution model that allows a single process to have
multiple code segments (i.e., threads) run concurrently within the “context”
of that process.
 You can think of threads as child processes that share the parent process
resources but execute independently.
 Multiple threads of a single process can share the CPU in a single CPU
system or (purely) run in parallel in a multiprocessing system
Ques) What do you mean by operating system? Explain different types of operating
systems.
Ques) What do you mean by operating system? Explain different types of operating
systems.

Time-Sharing OS:
 Each task has given some time to execute, so that all the tasks work smoothly.
 Each user gets time of CPU as they use single system. These systems are also
known as Multitasking Systems.
 The task can be from single user or from different users also. The time that each
task gets to execute is called quantum.
 After this time interval is over OS switches over to next task.
 Example of Time-Sharing OS is UNIX
Ques) What do you mean by operating system? Explain different types of operating
systems.
Ques) What do you mean by operating system? Explain different types of operating
systems.

Distributed OS:
 Various autonomous interconnected computers communicate each
other using a shared communication network.
 Independent systems possess their own memory unit and CPU.
 These are referred as loosely coupled systems or distributed systems.
 These systems processors differ in sizes and functions.
Ques) What do you mean by operating system? Explain different types of operating
systems.

 The major benefit of working with these types of operating system is that
it is always possible that one user can access the files or software which
are not actually present on his system but on some other system
connected within this network i.e., remote access is enabled within the
devices connected in that network.
 Example of Distributed Operating System are- LOCUS
Ques) What do you mean by operating system? Explain different types of operating
systems.
Ques) What do you mean by operating system? Explain different types of operating
systems.

Network OS:
 These systems run on a server and provide the capability to manage data,
users, groups, security, applications, and other networking functions.
 These types of operating systems allows shared access of files, printers, security,
applications, and other networking functions over a small private network.
 Examples of Network Operating System are: Microsoft Windows Server 2003,
Microsoft Windows Server 2008, UNIX, Linux etc.
Ques) What do you mean by operating system? Explain different types of operating
systems.

:
Ques) What do you mean by operating system? Explain different types of operating
systems.

Real-Time OS:
 These types of OS serve the real-time systems.
 The time interval required to process and respond to inputs is very small.
 This time interval is called response time.
 Real-time systems are used when there are times requirements are very
strict like missile systems, air traffic control systems, robots etc.
Ques) What do you mean by operating system? Explain different types of operating
systems.

Types of Real-Time Operating System which are as follows:

Hard Real-Time Systems:


 These OSare meant for the applications where time constraints are very
strict and even the shortest possible delay is not acceptable.
 These systems are built for saving life like automatic parachutes or air bags
which are required to be readily available in case of any accident. Virtual
memory is almost never found in these systems.
Ques) What do you mean by operating system? Explain different types of operating
systems.

Soft Real-Time Systems:


 These OS are for applications where for time-constraint is less strict.
 Examples of Real-Time Operating Systems are: Scientific experiments, medical
imaging systems, industrial control systems, weapon systems, robots, air traffic
control systems, etc
Download Gateway Classes Application
From Google Play store

Link in video Description

You might also like