Lecture 1 - Oakton Community College

advertisement
CSC155 Lecture 1
CSC155 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 (events from the past)
3. Describe basic components, organization of a computer.
Let us 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 algorithms
- 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
interfaces
- 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 bytes
1
CSC155 Lecture 1
Cache 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 behavior
- 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 reservation
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-Computer 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 Interface
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
2
CSC155 Lecture 1
-
General methods for efficiently and accurately using computers 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 expensive.
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 screen, 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 mechanisms 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 want 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?
3
CSC155 Lecture 1
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 our way to communication
Some people get so many emails, they cannot read all of them. So when your boss
is asking you “Why did not you do the task that I asked you to?” your answer “I
didn’t see your email”.
Important Concepts in Computer History
1.
2.
3.
4.
The mechanism of arithmetic
The stored program
The graphical user interface
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 in 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. (12th Century)
- In Western Europe, the Scottish mathematician John Napier(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 slide 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 rapid 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.
4
CSC155 Lecture 1
“Pascaline” was digital calculator. It used a series of eight tentoothed wheels (one
tooth for each 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 weaving loom invented in 1801, by Frenchman
Joseph Marie Jacquard. Holes punched in metal card directed the action of this
loom: 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
1833Analytical 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 similarity 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 computers 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 effort, 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
5
CSC155 Lecture 1
First generation - 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 bytes)
Cache L1 (level 1) (64KB)
Cache L2 (level 2) (1MB)
RAM (random access 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
writing 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 press “power off” button on your computer?


For some PCs electricity goes off, and everything in RAM is lost.
Some PCs 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 you turn on your computer?
BIOS begins startup procedure. It initializes devices and loads Master Boot 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, Windows).
Hardware – something real, that you can touch
6
CSC155 Lecture 1
Software – soft ware, program that can easily be added, changed, removed, etc. The
software is kept on hard drives, CDs, RAM, etc
Firmware – software that is written to ROM. It can be changed, but the change
process is usually slower and more complex than for regular software.
A bus is a hardware that connects different devices – transfers information from one
place to another place. In any computers there are many different buses that transfer data
with 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
graphic adapters) and few regular speed PCI Express buses (for everything else)
PATA or IDE bus (Parallel Advanced Technology Attachment). Connects external
storage (hard drives etc) to I/O controller. PATA is already obsolete. PATA uses wide
flat cables.
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 + Firmware + Software.
Multiple computers can be connected together in networks. Networks consist of regular
computers, specialized computers that purpose is to facilitate the networking (hubs,
switches, and routers), and network media (for example, wires). Smaller networks 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.
7
CSC155 Lecture 1
Internet is very large world network. 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 Languages - one statement of language is translated to many sometimes
dozens of machine commands. For example, C++, C, C# (CSharp Microsoft invented
language that resembles C++)
8
Download