CSC155 Lecture 1 Week 1

deliriousattackInternet and Web Development

Dec 4, 2013 (3 years and 11 months ago)

81 views

CSC
155


Lecture 1



1

CS
C155
Lecture 1 Week 1


Beginning Snapshots


Today Objectives are:

1.

Give an overview of computer science

(show it breadth)

2.

Provide context for computer science concepts

(event
s

from the past)

3.

Describe basic components, organization of a computer.



Let u
s
consider Areas of Compute Science. (What This Area Deals with)

First Area is

-

Algorithms and Data Structures


This area deals with
:


-

Specific classes of problems and their efficient solutions


-

Performance characteristics of alg
orithms


-

Organization of data relative to different access requirements



Examples:


Driving education.


How to start a car.

1.

open the door

2.

sit inside

3.

buckle up

4.

insert the key in the lock

5.

push a break pedal

6.

and so on


Second Area of Computer Science is

-

Architecture

This area deals with


-

Methods of organizing efficient, reliable computing systems


-

Implementation of processors, memory, communication, and software


i
nterfaces


-

Design and control of large, reliable computational systems.


Example


Have you look inside your personal computer?


Inside are Motherboard (buses between CPU and Memory and so on)



Fans,


Memory card,


Video

card


CPU

(Central Processing Unit)


CD drive



Hard drive (secondary memory)


Buses CPU


There are multiple chips on mother board


Memory 1GB=2
30

byt
e
s





CSC
155


Lecture 1



2


Cac
he memory 1 MB = 2
20
bytes (between CPU and Secondary Memory)


Third Area of Computer Science is

-

Artificial Intelligence and Robotics

This area deals with


-

Basic models of b
ehavior


-

Building (virtual or actual) machines to simulate animal and human


behavior


-

Inference, deduction, pattern recognition, and knowledge representation




Examples:

1.

Computer Games

2.

Roomba

Vacuum cleaner (I have at home)


Next Area of Computer Science is

-

Database and Information Retrieval

This area deals with


-

Organizing information and designing algorithms for the efficient access


and update of
stored information


-

Modeling data relationships


-

Security and protection of information in a shared environment


-

Characteristics of external storage devices


Examples:

1.

Library

2.

Hotel reserva
tion

You enter your information to the database

You come to the hotel to get the room,

They check your registration to the computers and can not find it.

It is example of good data base design.

3.

Google (search)


Next Area of Computer Science is

-

Human
-
Compu
ter Communication

This area deals with

-

Efficient transfer of information between humans and machines

-

Graphics

-

Human factors that affect efficient interaction

-

Organization and display of information for effective utilization by humans

Examples:

1.

Web Interfa
ce

2.

Voice recognition (in phones)
You can dial out using voice commands.




Next Area of Computer Science is

-

Numerical and Symbolic Computation

This area deals with

CSC
155


Lecture 1



3




-

General methods for efficiently and accurately using compu
ters to solve
equations from mathematical models

-

Effectiveness and efficiency of various approaches to the solution of equations

-

Development of high
-
quality mathematical software packages

Examples:

1.

Car crash testing. If you use real car, it is very expensi
ve.

Engineers create computer models of the cars and simulate crashes
.

2.

Weather forecast. It requires supercomputers. (Very heavy calculations)



Next Area of Computer Science is

-

Operating Systems

This area deals with

-

Control mechanism that allow multiple

resources to be efficiently coordinated
during execution of programs

-

Appropriate service of user requests

-

Effective
strategies for resource control

-

Effective organization to support distributed computation

Examples:

1.

Windows XP, Unix

2.

Blue

screen (blue scre
en, when Windows crashes)


Next Area of Computer Science is

-

Programming Languages



This area deals with

-

Notation for defining virtual; machines that execute algorithms

-

Efficient translation from high
-
level language to machine codes

-

Extension mecha
nisms that can be provided in programming languages


Example:


We are going to study C++ language.


Next Area of Computer Science is

-

Software Methodology and Engineering

This area deals with

-

Specification, design, and production of large
software system

-

Principles of programming and software development, verification, and
validation of software

-

Specification and production of software system that are safe, secure, reliable,
and dependable

Example:


Banking System.

Let assume that you w
ant to transfer money from one account to another account.

You issue to request to transfer money and while processing this request some bank
computers crash.

What is going to happen with your money transfer?

CSC
155


Lecture 1



4





Is

money going to be
transferred from the first to the second account
?

They disappear from first and don’t appear on second?

Or they stay on both accounts?


Computer system has to be designed in such way that the money transfer is done
always

in correct way even if the some parts of the computer system fail.


Next Area of Computer Science is

-

Social and Professional Context

This area deals with

-

Cultural, social, legal, and ethical issues related to computing

Example:


1. Email change ou
r way to communication

Some people get so many emails, they cannot read all of them.
So when your boss
is asking you “W
hy did not you do the task that I asked you

to?” y
ou
r answer

“I
didn’t see your email”.


Important Concepts in Computer History


1.

The mec
hanism of arithmetic

2.

The stored program

3.

The graphical user interface

4.

The computer net

work



Machines to Do Arithmetic

Early calculators:

-

Abacus
(

3000 B.C.
)

is one of the earliest “personal calculators” with movable
beads strung on rods to count and
do calculations.

-

The ancient British stone monument
Stonehenge
, located near Salisbury,
England, was built between 1900 and 1600 B.C. and, evidently, was used to
predict the changes of the seasons.

-

In the twelfth century, a Persian teacher of mathematics i
n Baghdad,
Muhammad ibn
-
Musa
al
-
Khowarizm
,

developed some of the first step
-
by
-
step
procedures for doing computations. The word
algorithm

used for such
procedure is derived from his name.

(12
th

Century)

-

In Western Europe, the Scottish mathematician John Na
pier
(1550
-
1617)
designed a set of ivory rods (called
Napier’s bones

1612
)

to assist with doing
multiplications. Napier also developed tables of logarithms and other
multiplication machines.

-

The English mathematician William Oughred invented a circular
slid
e rule

in
the early 1600s. It was based on Napier’s logarithms and more modern ones.
They were used by engineers and
scientists through

the

1950s and into 1960s
to do rap
id approximate computations.

(analog machine)

-

The young French mathematician Blaise
Pascal (1623
-
1662) invented one of the
first mechanical adding machines to help his father with calculating taxes
.

CSC
155


Lecture 1



5




“Pascaline” was
digital

calculator. It used a series of eight tentoothed wheels (one
tooth for e
ach decimal digit), which were connected so that numbers could be
added or subtracted by moving the wheels.

-

The

German mathematician
Leibniz

invented and improved mechanical
calculator
, that it could perform all four basic arithmetic operations:+,
-
, *,
/
(1673)

The Stored Program


-

An early example of a stored program automatically controlling a hardware
device can be found in the weavi
ng loom invented in 1801, by Fre
nchman
Joseph Marie Jacquard
. Holes punched in metal card directed the action of this
loo
m: A hole punched in one of the cards would enable its corresponding thread
to come through and be incorporated into the weave at a given point in the
process; the
absence of a hole would exclude

an undesired thread.

-

Charles Babbage (1792
-
1871) (English)

1822
-
1833

Difference Engine

1833
-

Analytical Engine

The basic design of Analytical Engine involved the four primary operations of
computer system:
processing, storage, input and output.



-

1842 Ada Augusta (first woman programmer)


Showed sim
ilarity Jacquard and Babbage Machine


(with their punch cards)


-

1890 Hollerith’s electric Tabulating Machine that could tally census statistics
that had been stored on punched cards.

-

(1935
-
1938) Konrad Zuse (German)

(designed his compute
rs to mechanize arithmetic of binary numbers) before
machines were based on decimal numbers. Simplifying the engineering of his
computer (only two state device 0, 1)

The two
-
state device Zuse deployed was
the electromechanical relay, a two position switch
that would either complete or
break the circuit connecting two phone lines. (automate connections previously
managed by human operators)

He also offered to Hitler to build first fully
electronic

computer. (but Hitler
refused)
.

-

Alan Turing 1937 ( British)
developed the universal machine concept, forming
the basis of computability theory (ch4). During World War II, he was part of a
team whose task was to decrypt intercepted messages of the German forces.
Several machines resulted from this British war effor
t, one of which was the
Collosus, finished 1943

-

Mark I (1944) full name Harvard
-
IBM Automatic Sequence Controlled
Calculators. It was driven by electromechanical relay technology. (Repeating
work of Babbage, Howard Aiken and others in IBM

constructed large
,
automatic, general
-
purpose, electromechanical calculator.

-

Grace Murray Hopper (1907
-
1992) Grandma COBOL programming language
for business applications

CSC
155


Lecture 1



6






First
g
eneration
-

computer based on vacuum tubes


ENIAC (Electronic Numerical Integrator and Computer)

(began work on it in
1943)


Second generation
-

computer
based on transistors



Third generation
is
based on integrated circuits.



Q.
What is
the current
generation
?


A. Generation four
-

Microchips



Part 2

Memory
pyramid


Registers (
for example, 16 registers 64 bits each,
64 bit

=

8

byte
s)

Cache L1 (level 1)

(64KB)

Cache L2

(l
evel 2)

(1MB)

RAM (random acces
s memory, 1 GB)

Hard Drive

(100 GB)

CD, DVD drive, USB stick, floppy drive



Other types of memory


ROM (“read” only memory) often contains BIOS (Basic Input Output System)
. It is
actually not “read” only in the sense that is possible to overwrite ROM but
the
wr
iting process is much slower

than the reading.


NVRAM (Non Volatile RAM
,
1MB)

contains BIOS parameters.
NVRAM can be
implemented as RAM + battery or so called flash memory that does not require
electrical power at all.


What
does happen

when you
pres
s “power

off
” button on

your computer?




For s
om
e PCs electricity goes

off, and everything in RAM
is

lost.



Some PC
s

do not turn off electricity, but go to stand by and consume
very little

electricity. In this case,
RAM is not

lost.


What
does happen when yo
u turn on your

computer?


BIOS begin
s

startup

procedure.

It initializes devices and l
oad
s Master Boo
t Record

(512 bytes)

from a hard drive.

The Master Boot Record loads Boot Loader (size is
larger). The Boot Loader loads operating system (for example, Wind
ows).


Hardware


something real, that you can touch

CSC
155


Lecture 1



7

Software


soft ware, program that can easily be added, changed, removed, etc. The
software is kept on hard drives, CDs, RAM, etc


Fi
rmware



software

that is written to ROM. It can be changed, but the c
hange
process is usually
slower

and more complex than for regular software.



A bus is a hardware that
connect
s different devices



transfer
s

information from one
place to another place.

In any computers there are many different buses that transfer data
wi
th different speed.


PCI bus (Personnel Computer Interconnect). Connects
motherboard

and adapters. PCI is
already obsolete.

AGP bus (Advanced Graphic Port). Connects
motherboard
and graphic adapter. AGP is
already obsolete.

PCI Express bus


a replacement
for PCI and AGP. PCI Express bus can be implemented
with different speed. Modern PCs have one or two high speed PCI Express buses (for
gra
phic adapters) and few regular speed PCI Express buses (for everything else)


PATA or IDE bus (Parallel Advanced Techn
ology Attachment). Connects external
storage (hard drives etc) to I/O controller. PATA is already obsolete. PATA uses wide
flat cab
les.

SATA bus (Serial ATA) Connects external storage (hard drives etc) to I/O controller.
Faster and more convenient to use
than PATA.
SATA uses narrow cables.

SCSI bus (Small Computer Systems Interconnect). Connects external storage (hard drives
etc) to I/O controller. Used mostly for heavy duty computers. Usually more faster, more
reliable, but more expensive than SATA. There

are multiple variants of SCSI (SCSI
-
1,
SCSI
-
2, etc, Serial SCSI)


Computer

=

Hardware

+

Fi
rmware

+

Software.


Multiple computers can be connected together in networks. Networks consist of regular
computers, specialized computers that purpose is to facilit
ate the networking (hubs,
switches, and routers), and network media (for example, wires). Smaller networ
ks can be
connected together to create large network.


LAN (Local Area Network) is a network of computers that reside not far from each other.
The most
popular LAN technology is
wired
Ethernet.



WLAN (Wireless Local Area Network). It is a of LAN where data are transferred via
radio.


WAN (Wide Area Network) is a network of computers that reside very far from each
other.


CSC
155


Lecture 1



8

Internet is
very large world netw
ork. It consists of many smaller networks connected
together. Today most regular purpose computers are connected to the Internet.

.

Assembly Language


low level language,
is
translated to machine code language one to
one


High Level Language
s

-

one state
ment of language is translated to many sometimes
dozens of machine commands. For example,

C++, C,

C#
(
CSharp Microsoft invented
language that resembles

C++
)