CSE1301 Computer Programming: Lecture 28 Transaction Processing.
Introduction to Computer and Programming - Lecture 02
-
Upload
hassaanciit -
Category
Technology
-
view
461 -
download
1
description
Transcript of Introduction to Computer and Programming - Lecture 02
![Page 1: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/1.jpg)
1
Introduction to Computers and Programming (CSC103)
Lecture 02
![Page 2: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/2.jpg)
The System Unit
• The system unit is a case that contains electronic components of the computer used to process data
2
![Page 3: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/3.jpg)
The System Unit
• The inside of the system unit on a desktop personal computer includes:
3
Drive bay(s)
Power supply
Sound card
Video card
Processor
Memory
![Page 4: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/4.jpg)
The System Unit
• The motherboard is the main circuit board of the system unit
– A computer chip contains integrated circuits (IC)
4
![Page 5: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/5.jpg)
Processor
• The processor, also called the central processing unit (CPU), interprets and carries out the basic instructions that operate a computer
– Contain a Control Unit and an Arithmetic Logic Unit (ALU)
5
![Page 6: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/6.jpg)
Pro
cess
or
6
![Page 7: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/7.jpg)
Processor
• The control unit is the component of the processor that directs and coordinates most of the operations in the computer
– Interprets each instruction issued by a program and then initiates the appropriate action (to carry out the instruction)
• The arithmetic logic unit (ALU) performs arithmetic, comparison, and other operations
7
![Page 8: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/8.jpg)
Processor – Machine Cycle
• For every instruction, a processor repeats a set of four basic operations, which comprise a machine cycle
1. Fetch
2. Decode
3. Execute
4. Store
8
![Page 9: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/9.jpg)
Processor
The processor contains registers, that temporarily hold data and instructions
• Registers are part of the Processor
• Processor has many different type of registers
• Register function includes; storing location, storing instruction, storing data and storing results of a calculation
The system clock controls the timing of all computer operations
• The pace of the system clock is called the clock speed, and is measured in gigahertz (GHz)
• Giga = Billion, Hertz = one cycle per second
• Faster the clock speed, more instructions can be executed per second
9
![Page 10: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/10.jpg)
Dual Core and Multi-Core Processors
• Dual-Core Processor is a single chip that contains two separate processors
• Multi-Core Processor is a chip with two or more separate processors
– Implements multiprocessing into a single physical package
– Quad-Core Processor contains four (4) cores
10
![Page 11: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/11.jpg)
Moore’s Law
• Number of transistors and resistors placed on computer chips would double every year
– With a proportional increase in computing power and decrease in cost
11
![Page 12: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/12.jpg)
12
Figure: Moore’s Law
![Page 13: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/13.jpg)
Processor
• A processor chip generates heat that could cause the chip to burn up
• Require additional cooling
– Heat sinks
– Liquid cooling technology
13
![Page 14: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/14.jpg)
Memory
• Memory consists of electronic components that store instructions waiting to be executed by the processor, data needed by those instructions, and the results of processing the data
• Stores three basic categories of items:
14
The operating system and other system software
Application programs
Data being processed and the
resulting information
![Page 15: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/15.jpg)
Memory
• Each location in memory has an address
• Byte is the basic storage unit in memory
• Memory size is measured in kilobytes (KB or K), megabytes (MB), gigabytes (GB), or terabytes (TB)
15
![Page 16: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/16.jpg)
Memory
• The system unit contains two types of memory:
16
Volatile memory
Loses its contents when power is turned off
Example includes RAM
Nonvolatile memory
Does not lose contents when power is removed
Examples include ROM, flash memory, and
CMOS
![Page 17: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/17.jpg)
Memory – RAM
• RAM (Random Access Memory) is also called main memory
• Consists of memory chips that can be read from and written to by the processor and other devices
• When you turn on computer
– Certain Operating System files are loaded into RAM from a storage device such as a hard disk
• Saving is the process of copying data, instructions and information from RAM to a storage device
17
![Page 18: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/18.jpg)
Storage
Storage holds data, instructions, and information for future use
A storage medium is the physical material on which a computer keeps data, instructions, and information
18
![Page 19: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/19.jpg)
Storage
19
![Page 20: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/20.jpg)
Storage
• Capacity is the number of bytes a storage medium can hold
20
![Page 21: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/21.jpg)
Storage
• A storage device is the computer hardware that records and/or retrieves items to and from storage media
21
Reading is the process of transferring items from a storage medium into memory
Writing is the process of transferring items from memory to a storage medium
![Page 22: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/22.jpg)
Storage
• Access time measures:
– The amount of time it takes a storage device to locate an item on a storage medium
• In milliseconds or microseconds
• Measured in KBps and MBps
– The time required to deliver an item from memory to the processor
• In nanoseconds
22
![Page 23: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/23.jpg)
Hard Disks
• A hard disk contains one or more inflexible, circular platters that use magnetic particles to store data, instructions, and information
23
![Page 24: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/24.jpg)
Hard Disks
• Characteristics of a hard disk include:
24
Capacity Platters Read/Write
Heads Cylinders
Sectors and Tracks
Revolutions per Minute
Transfer Rate Access Time
![Page 25: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/25.jpg)
25
![Page 26: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/26.jpg)
Hard Disks
26
![Page 27: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/27.jpg)
Hard Disks
• The hard disk arms move the read/write head, which reads items and writes items in the drive
– Location often is referred to by its cylinder
27
![Page 28: Introduction to Computer and Programming - Lecture 02](https://reader034.fdocuments.net/reader034/viewer/2022052504/54848a8ab4af9f910d8b4b84/html5/thumbnails/28.jpg)
Hard Disks
28