Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views29 pages

Lecture - 3-1

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 29

Lecture -

COMPUTER
PROGRAMMING

COMPUTER ENGINEERING
DEPARTMENT
Recap
• Computer Hardware

• Computer Software

• How Computers represents data


Text Codes
• Numbers represents the letters of alphabets, special
characters and other symbols.

• Need of a standard text code, agreed by all.

• There are four most popular text code systems


Text Codes
• There are four most popular text code systems:

• Extended Binary Coded Decimal Interchange Code (EBCDIC)


• 8-bit code with 256 symbols and now its very rare

• American Standard Code for Information Interchange (ASCII)


• 8-bit code with 128 symbols, American English symbols

• Extended ASCII
• Graphics and other symbols

• Unicode
• All the languages on planet
Computer Organization
Central Processing Unit (CPU)
• It
is brain of the computer where most of the
calculations takes place

• Processor has two main units


• Control Unit
• Datapath
• Arithmetic Logic Unit (ALU)
• Control Unit
• Control Unit

• ALU
• Operations (+,-,/,x)
• Logical (AND, OR, NOT, NAND, NOR, XOR)
Central Processing Unit (CPU)
System Clock
• Synchronizes all the computer operations.

• Processor operating frequency.

• Faster clock speed means the CPU can execute more


instructions each second.

• If computer’s clock speed if 800 MHz, it means it ticks 800


million times per second.
• Modern computers have clock speed in Giga Hertz (GHz)
Machine Cycles
• WhenCPU executes an instruction, it takes a series of steps. The
complete series of steps is called machine cycle.

• Machine cycle can be broken in to


• Instruction cycle
• Execution cycle

• Four steps machine cycle


• Fetch Instruction
• Decode Instruction
• Execute Instruction
• Store

Computer executes million of instructions per second.


Memory
• Volatile and non-volatile memories.
Memory
• Non-volatile memory
• Read only memory (ROM)
• Basicinput output system (BIOS)
• Power on Self Test (POST)

• Volatile memory
• Requires power tohold data
• Random Access Memory (RAM)
• CPU reads data using the address

• Flash Memory
• Datais stored using physical switches
• Special form of non volatile memory
CPU Registers
• Temporary storage location used by CPU.

• Number of bits a processor can handle.


Terminology:
“32 Bit processor”

• Typical sizes 8,16,32 and 64 bit.

• Thesize of the register is called word size, indicates


the amount of data with which computer can work
at any given time.
Cache Memory
• Very fast memory and have lower access time.

• Holdcommon and most recent data used by


processor.

• Most computer have several level of cache memory.


The BUS
•BUS width measured in Bits.

•Speed is tied to system clock.

•Different BUS standards:


• IndustryStandard Architecture (ISA)
• Local BUS
Connects modems and
• Peripheral Component Interconnect (PCI)
sound
Connects video cards
cards to motherboards
• Accelerated Graphics Ports (AGP)
• Universal Serial BUS (USB) Connects external devices such as camera, printers
and scanners.
• IEEE 1394 (Firewire)
• PC Card
Question

• How can different CPUs be compared?


• Clock Speed
• MIPS
• FLOPs

• What factors affects the CPU speed?


• Registers
• Cache Memory
• System and I/O BUS
• System Clock
Operating System
• What is an Operating System?

•A program that acts as an intermediary between a user of a


computer and the computer hardware

• What is the purpose of an OS?

• To provide an environment in which a user can execute


programs.
• What are the goals of an Operating System?

• The
primary goal of an Operating System is to make the
computer system convenient to use.
Operating System
OS Kernel

• The heart of the OS

• Responsible for all the essential operations like managing


resources, task scheduling, etc.

• Also contains low-level HW interfaces.

• Size important, as it is memory-resident


Core Tasks of OS

• Processor management
• Memory management
• Device management
• Storage management
• Application Interface
• User Interface
Process Management

• Various
programs compete for the attention of the
microprocessor.

• TheOS plays the role of the honest referee, making sure that
each application gets the necessary attention required for its
proper execution.

• It
tries to optimally manages the limited processing capacity of
the microprocessor to the greatest good of all the users & apps
Memory Management

• Straight forward for a single-user, single tasking

• The OS ensures that:


• each application has enough private memory
• applications do not run into other application’s private
memory.

• TheOS is responsible for efficient utilization of hierarchical


system memory (e.g. RAM, cache, etc.).
Device Management

• Applications
talk to devices through the OS and OS talks
to and manages devices through device drivers

• Example: When we print to a laser printer, we do not


need to know its details. All we do is to tell the printer
device driver about what needs to be printed and it takes
care of the details
Storage Management

•A file system is a collection of directories, subdirectories,


and files organized in a logical order

• TheOS is responsible for maintaining the file system


through indexing of filenames and their disk location.

• The OS can find any file in a logical and timely fashion


Application Interface

• Application
developers do not need to know much about
the hardware

• TheOS provides all applications with a straight-forward and


consistent interface to hardware

• Example: An application uses the OS to store data on the


disk drive without knowing exact physical characteristics of
the disk.
User Interface
• Users communicate with the
computer using a user
interface provided by the OS

• Command line

• Graphical User Interface


Types of OS

• Real-time OS (RTOS)
• Small OS, Build into Device, Respond quickly to user input
• Single user/Single tasking OS
• One user, one task at a time.

• Single user/Multitasking OS
• One user, multiple tasks

• Multiuser/Multitasking OS
• Many users connect to one computer.
PC Operating Systems
•DOS •Unix
•Windows 95 •Linux
•Windows 2000 •Ubuntu
•Windows NT •Fedora
•Windows XP
•Windows 7
•Windows 10
Summary
• Text Codes

• Computer Organization

• Factors affecting processing speed

• Operating Systems

You might also like