Professional Documents
Culture Documents
Amity School of Engineering &: Technology
Amity School of Engineering &: Technology
1
Amity School of Engineering & Technology
Schools ASET
Program & Semester CSE I semester
Credit Unit 03
Faculty Name
Mr. Vivek Parashar
Email Vparahsar@gwa.amity.edu
2
Amity School of Engineering & Technology
About Myself
3
Amity School of Engineering & Technology
My Promise to you
• I will treat you with respect
• I will be available for questions (after class, during
office hours)
• I will arrive prepared to teach
• I will try to be engaging and helpful
• I will grade you fairly and objectively
4
Amity School of Engineering & Technology
University Expectations
• Come to class on-time (especially during exams)
• Turn in work on-time
• Do all work independently (except group work)
• Follow Rules of Conduct and Academic Behavior
Standards as detailed in the Student Regulations.
• Take responsibility for your own learning!
5
Amity School of Engineering & Technology
My Expectations
6
Amity School of Engineering & Technology
Course Objectives
• The objective of this course is to acquaint the students with the
basics of computers system, its components.
• To make the student learn a programming language.
• To learn problem solving techniques.
• To teach the student to write programs in C and to solve the
problems.
Amity School of Engineering & Technology
Learning Outcomes
• After Completion of this course the student would be able to
• Read, understand and trace the execution of programs written in C
language.
• Write the C code for a given algorithm.
• Implement Programs with pointers and arrays, perform pointer
arithmetic, and use the pre-processor.
• Write programs that perform operations using derived data types.
Amity School of Engineering & Technology
Syllabus
Module 1: Introduction to Programming:
Introduction to components of a computer system (disks, memory,
processor, where a program is stored and executed, operating system,
compilers etc.) Idea of Algorithm: steps to solve logical and numerical
problems. Representation of Algorithm: Flowchart/ Pseudocode with
examples. From algorithms to programs; source code, variables (with
data types) variables and memory locations, Syntax and Logical Errors
in compilation, object and executable code.
Amity School of Engineering & Technology
Module 3: Arrays:
Arrays (1-D, 2-D), Character arrays and Strings.
Module 5: Function:
Functions (including using built in libraries), Parameter passing in
functions, call by value, Passing arrays to functions: idea of call by
reference
Module 6: Recursion:
Recursion, as a different way of solving problems. Example
programs, such as Finding Factorial, Fibonacci series, Ackerman
function etc. Quick sort or Merge sort.
Module 7: Structure:
Structures, Defining structures and Array of Structures.
Amity School of Engineering & Technology
Module8: Pointers:
Idea of pointers, Defining pointers, Use of Pointers in self-referential
structures, notion of linked list (no implementation)
Module 9: File handling:
Basics of file Handling.
Amity School of Engineering & Technology
Computer
Amity School of Engineering & Technology
Data Processing
The activity of processing data using a computer is called
data processing
Data
Capture Data
Manipulate Data
Output Results
Information
Data is raw material used as input and information
is processed data obtained as output of data
processing
Amity School of Engineering & Technology
Amity School of Engineering & Technology
(Continued on next
slide)
Amity School of Engineering & Technology
Evolution of Computers
Blaise Pascal invented the first mechanical adding
machine” Pascaline” in 1642-44
Amity School of Engineering & Technology
Jacquard Loom
Amity School of Engineering & Technology
• Charles Babbage is
considered to be
the father of modern digital
computers
• He designed “Difference
Engine” in 1833
• Known as Automatic
Sequence Controlled
Calculator
• Fully automatic calculating
machine designed by
Howard A Aiken in
collaboration with IBM
• Design was based on
punched card machinery.
• It was complex in design
and huge in size.
• Uses 3000 electrically
actuated switches and was
50 ft long and 8 ft hig
Amity School of Engineering & Technology
Computer Generations
“Generation” in computer talk is a step in technology. It
provides a framework for the growth of computer
industry
(Continued on next
slide)
Amity School of Engineering & Technology
Computer Generations
(Continued from previous slide..)
Some
Generation Key hardware Key software Key characteristics representative
(Period) technologies technologies systems
(Continued on next
slide)
Amity School of Engineering & Technology
Computer Generations
(Continued from previous slide..)
Third ICs with SSI and Timesharing Faster, smaller, more IBM 360/370
(1964-1975) MSI technologies operating reliable, easier and PDP-8
Larger magnetic system cheaper to produce PDP-11
cores memory Standardization Commercially, easier
CDC 6600
Larger capacity of high-level to use, and easier to
disks and programming upgrade than previous
magnetic tapes languages generation systems
secondary storage Unbundling of Scientific, commercial
Minicomputers; software from and interactive on-
upward hardware line applications
compatible family
of computers
(Continued on next
slide)
Amity School of Engineering & Technology
Computer Generations
(Continued from previous slide..)
Fourth (1975- ICs with VLSI Operating systems for Small, affordable, IBM PC and
1989) technology PCs with GUI and reliable, and easy its clones
Microprocessors; multiple windows on a to use PCs Apple II
semiconductor memory single terminal screen More powerful TRS-80
Larger capacity hard Multiprocessing OS with And reliable VAX 9000
disks as in-built concurrent mainframe
CRAY-1
secondary storage programming systems and
languages supercomputers CRAY-2
Magnetic tapes and
floppy disks as portable UNIX operating system Totally general CRAY-X/MP
storage media with C programming purpose machines
Personal computers language Easier to produce
Supercomputers based Object-oriented design commercially
on parallel vector and programming Easier to upgrade
processing and PC, Network-based, Rapid software
symmetric and supercomputing development
multiprocessing applications possible
technologies
Spread of high-speed
computer networks
(Continued on next
slide)
Amity School of Engineering & Technology
Computer Generations
(Continued from previous slide..)
Fifth (1989- ICs with ULSI Micro-kernel based, Portable computers IBM notebooks
Present) technology multithreading, Powerful, cheaper, Pentium PCs
Larger capacity distributed OS reliable, and easier SUN Workstations
main memory, hard Parallel to use desktop IBM SP/2
disks with RAID programming machines
libraries like MPI & SGI Origin 2000
support Powerful
Optical disks as PVM PARAM 10000
supercomputers
portable read-only JAVA High uptime due to
storage media World Wide Web hot-pluggable
Notebooks, Multimedia, Internet components
powerful desktop applications Totally general
PCs and More complex purpose machines
workstations supercomputing Easier to produce
Powerful servers, applications commercially, easier
supercomputers to upgrade
Internet Rapid software
Cluster computing development
possible
Amity School of Engineering & Technology
Key Words/Phrases
Operating Systems
Amity School of Engineering & Technology
Suffix Meaning
G1-G7 Graphics level (processors with new integrated graphics technology only)
S Special edition
T Power-optimized lifestyle
Processor
Product Launch Max Turbo
Status # of Cores Base Cache
Name Date Frequency
Frequency
Intel®
16 MB
Core™
Intel®
i9- Launched Q2'19 8 5.00 GHz 2.40 GHz
Smart
9980HK
Cache
Processor
Intel® 16 MB
Core™ Intel®
Launched Q2'19 8 4.80 GHz 2.30 GHz
i9-9880H Smart
Processor Cache
Intel® 16 MB
Core™ Intel®
Launched Q2'19 8 4.40 GHz 2.10 GHz
i9-9900T Smart
Processor Cache
Intel®
16 MB
Core™
Intel®
i9- Launched Q4'19 8 5.00 GHz 4.00 GHz
Smart
9900KS
Cache
Processor
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Cache Memory
• The development of caches and caching is one of the most
significant events in the history of computing. Virtually every
modern CPU core from ultra-low power chips like the ARM Cortex-
A5 to the highest-end Intel Core i9 use caches.
Amity School of Engineering & Technology
• Imagine that a CPU has to load data from the L1 cache 100 times in
a row. The L1 cache has a 1ns access latency and a 100 percent hit
rate. It, therefore, takes our CPU 100 nanoseconds to perform this
operation.
Amity School of Engineering & Technology
• Now, assume the cache has a 99 percent hit rate, but the data the CPU
actually needs for its 100th access is sitting in L2, with a 10-cycle
(10ns) access latency. That means it takes the CPU 99 nanoseconds to
perform the first 99 reads and 10 nanoseconds to perform the 100th. A 1
percent reduction in hit rate has just slowed the CPU down by 10
percent.
• In the real world, an L1 cache typically has a hit rate between 95 and 97
percent, but the performance impact of those two values in our simple
example isn’t 2 percent — it’s 14 percent. Keep in mind, we’re
assuming the missed data is always sitting in the L2 cache. If the data
has been evicted from the cache and is sitting in main memory, with an
access latency of 80-120ns, the performance difference between a 95
and 97 percent hit rate could nearly double the total time needed to
execute the code.
Amity School of Engineering & Technology
The CPU runs the UEFI or BIOS, which tests and initializes
your system’s hardware—including the CPU itself. For
example, if your computer doesn’t have any RAM, it will
beep and show you an error, stopping the boot process.
This is known as the POST (Power On Self Test) process.
Definition
An Operating System, or OS,
is software that enables a
user and application software
to interact with a computer’s
hardware and the data and
other programs stored on the
computer.
An OS performs basic tasks,
such as recognizing input
from the keyboard, sending
output to the display screen,
keeping track of files and
directories on the disk, and
controlling peripheral devices
such as printers.
Amity School of Engineering & Technology
Need for an OS
• The primary need for the OS arises from the fact that
user needs to be provided with services and OS ought to
facilitate the provisioning of these services.
• The central part of a computer system is a processing
engine called CPU. A system should make it possible for
a user’s application to use the processing unit.
• A user application would need to store information. The
OS makes memory available to an application when
required.
• Similarly, user applications need use of input facility to
communicate with the application. This is often in the
form of a key board, or a mouse or even a joy stick (if the
application is a game for instance).
Amity School of Engineering & Technology
• The output usually provided by a video monitor or a printer as some times the
user may wish to generate an output in the form of a printed document. Output
may be available in some other forms. For example it may be a video or an
audio file.
Let us consider few applications.
• Document Design
• Accounting
• E-mail
• Image processing
• Games
We notice that each of the above application requires resources for
• Processing information
• Storage of Information
• Mechanism to inputting information
• Provision for outputting information
These service facilities are provided by an operating system regardless of the nature
of application.
Amity School of Engineering & Technology
Other Services
Program Execution
OS provides an environment where the user can conveniently run
programs. The user does not have to worry about memory allocation
or CPU scheduling.
I/O Operations
Each program requires input and produces output. The OS hides
some of the details of the underlying hardware for such I/O. All the
user sees is that the I/O has been performed, without those details.
Communications
There are instances where processes need to communicate with
each other to exchange information. It may be between processes
running on the same computer or running on different computers.
The OS provides these services to application programs, making
inter-process communication possible, and relieving the user of
having to worry about how this accomplished.
Amity School of Engineering & Technology
UNIX
UNIX was one of the first operating systems to
be written, in 1971.