SlideShare a Scribd company logo
1
Chap-3
A Top Level View of Computer
Function & Interconnection
Ch-3
 Topic: Single Processor Architecture
 Reading: Stallings, Sections 3.1
through 3.3

COA
Today’s Agenda
 Computer Components
 Computer Function
 Interrupts – Types & Instruction Cycle
 Multiple Interrupts
 I/O Functions
 Interconnection Structures
Review of Three Key Concepts of von
Neumann Architecture
 Data and instructions in single read-write
memory
 Memory contents are addressable by location
regardless of whether content is data or
instruction
 Execution of code is sequential from one
instruction to the next unless a jump is
encountered
Hardwired Program
 There is a small set of basic logic components that can be
combined in various ways to store binary data and to perform
arithmetic and logical operations on that data.
 If there is a particular computation to be performed, a
configuration of logic components designed specifically for that
computation could be constructed.
 We can think of the process of connecting the various
components in the desired configuration as a form of
programming. The resulting “program” is in the form of
hardware and is termed a
hardwired program.
Hardwired Program
 Customized H/W – the system accepts data &
produces results.
Program Concept
 Just about any function can be realized with
hardwired logic components (calculator)
 Hardwired systems, however, are inflexible
 General purpose hardware can do different
tasks, given correct control signals
 Instead of re-wiring, supply a new set of control
signals
Instruction Interpreter
Now we need a device to accept unique instruction
codes and turn them into control signals for the
arithmetic and logic hardware.
How Can We Create a Program?
 Each step activates a set of control signals to
control general purpose logic
 Each step is an arithmetic or logical operation
 For each operation, a different set of control
signals is needed
 Program equals the sequence of steps
 Programming is no longer a case of rewiring
How Can We Create a Program?
 Programming is now much easier. Instead of
rewiring the hardware for each new program, all we
need to do is provide a new sequence of codes.
 Each code is, in effect, an instruction, and part of
the hardware interprets each instruction and
generates control signals.
 To distinguish this new method of programming, a
sequence of codes or instructions is called
software.
Encoding Instructions
 Unique binary patterns identify operation to
be performed.
 Examples:
 Simple addition machine in Figure 3.5 on page 89
of textbook
 A useful link for Assembly language help

http://www.plantation-productions.com/Webster/
 This URL may be used in coming classes.
03. top level view of computer function & interconnection
03. top level view of computer function & interconnection
03. top level view of computer function & interconnection
03. top level view of computer function & interconnection
03. top level view of computer function & interconnection
03. top level view of computer function & interconnection
Computer Components: Top-Level View
Computer Components: Detail
 The CPU exchanges data with memory. For this purpose, it
typically
makes use of two internal (to the CPU) registers:
 (1). a memory address register (MAR), which specifies the
address in memory for the next read or write,
 (2). a memory buffer register (MBR), which contains the data
to be written into memory or receives the data read from
memory.
 Similarly, an I/O address register (I/O AR) specifies a
particular I/O device.
 An I/O buffer (I/O BR) register is used for the exchange of
data between an I/O module and the CPU.
Simplified 2-Step Instruction
Cycle
 Instruction cycle is not the same thing as a
clock cycle
 Two steps:
 Fetch
 Execute
Fetch Cycle
 Program Counter (PC) holds address of next
instruction to fetch
 Processor fetches instruction from memory location
pointed to by PC
 Increment PC unless instructed otherwise
 Instruction loaded into Instruction Register (IR)
 Processor interprets instruction and performs
required actions
 What problems can you predict happening in this
cycle?
Execute Cycle
 Processor-memory
 data transfer between CPU and main memory
 Processor-I/O
 Data transfer between CPU and I/O module
 Data processing
 Some arithmetic or logical operation on data
Execute Cycle
 Control
 Alteration of sequence of operations, e.g. jump
 e.g. the processor may fetch an instruction from location
149, which specifies that the next instruction be from
location 182. The processor will remember this fact by
setting the program counter to 182.Thus, on the next fetch
cycle, the instruction will be fetched from location 182
rather than 150.
 Combination of above
Instruction Cycle State Diagram
Instruction Cycle State Diagram - Explanation
 Instruction address calculation (iac): Determine the
address of the next instruction to be executed. Usually, this
involves adding a fixed number to the address of the
previous instruction.
 Instruction fetch (if): Read instruction from its memory
location into the processor.
 Instruction operation decoding (iod): Analyze
instruction to determine type of operation to be performed
and operand(s) to be used.
 Operand address calculation (oac): If the operation
involves reference to an operand in memory or available via
I/O, then determine the address of the operand.
Instruction Cycle State Diagram - Explanation
 Operand fetch (of): Fetch the operand from
memory or read it in from I/O.
 Data operation (do): Perform the operation
indicated in the instruction.
 Operand store (os): Write the result into
memory or out to I/O.
Interrupts
 No special code is needed in main code
 Interrupt Service Routines (ISR) handle
condition
 Interrupts may be disabled; pending interrupts
serviced as soon as interrupts are enabled
again
 Global enabling – affects all maskable
interrupts
 Local enabling – affects individual interrupts
Types of Interrupts
 Program – Something that occurs as a result of program
execution such as illegal instructions, arithmetic overflow,
divide by zero, or memory handling error
 Timer – Generated by one of the processor's internal
timers so that the processor can perform some time-
scheduled task
 I/O – Generated by an I/O controller to request service
from the processor such as keyboard, mouse, NIC, disk
drive
 Hardware failure – signifies some error condition with the
hardware
Multiple Interrupts
 Disable interrupts
 Processor can ignore further interrupts whilst
processing one interrupt or interrupts may be nested
 Ignored interrupts remain pending and are checked
after first interrupt has been processed
 Define priorities
 Low priority interrupts can be interrupted by higher
priority interrupts
 When higher priority interrupt has been processed,
processor returns to previous interrupt
03. top level view of computer function & interconnection
CPU Context Switch From Process to Process
Program Flow Control
Interrupt Cycle
Interrupt Cycle (continued)
 Added to instruction cycle
 Processor checks for interrupt
 If no interrupt, fetch next instruction
 If interrupt pending:
 Suspend execution of current program
 Save context on stack (typically registers, PC, flags, etc.)
 Set PC to start address of interrupt handler routine
 Process interrupt
 Restore context and continue interrupted program
Transfer of Control via Interrupts
Program Timing -- Short I/O Wait
Program Timing -- Long I/O Wait
Instruction Cycle (with
Interrupts) - State Diagram
Multiple Interrupts - Sequential
Multiple Interrupts – Nested
Time Sequence of Multiple Interrupts
I/O Modules
 I/O modules occasionally require attention,
usually in the form of a data transfer
 Processor can simply transfer data back and
forth with the device as if it were memory
 Alternatively, processor can grant I/O module
permission to write directly to memory –
Direct Memory Access (DMA) – Interrupt
occurs when DMA is complete
Ad

More Related Content

What's hot (20)

Memory management
Memory managementMemory management
Memory management
Muhammad Fayyaz
 
3 computer hardware and fundamentals edited for 1st sem
3 computer hardware and fundamentals edited for 1st sem3 computer hardware and fundamentals edited for 1st sem
3 computer hardware and fundamentals edited for 1st sem
Vedpal Yadav
 
Computer architecture and organization
Computer architecture and organizationComputer architecture and organization
Computer architecture and organization
Tushar B Kute
 
Mips architecture
Mips architectureMips architecture
Mips architecture
Rashid Ahmad
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
Anuj Modi
 
0 introduction to computer architecture
0 introduction to computer architecture0 introduction to computer architecture
0 introduction to computer architecture
aamc1100
 
Instruction cycle with interrupts
Instruction cycle with interruptsInstruction cycle with interrupts
Instruction cycle with interrupts
Shubham Jain
 
Embedded systems basics
Embedded systems basicsEmbedded systems basics
Embedded systems basics
Mathivanan Natarajan
 
Unit 4 ca-input-output
Unit 4 ca-input-outputUnit 4 ca-input-output
Unit 4 ca-input-output
BBDITM LUCKNOW
 
Input-Output Modules
Input-Output ModulesInput-Output Modules
Input-Output Modules
Mukesh Tekwani
 
Central processing unit
Central processing unitCentral processing unit
Central processing unit
jyoti_lakhani
 
Chapter01Introducing Hardware
Chapter01Introducing HardwareChapter01Introducing Hardware
Chapter01Introducing Hardware
Patty Ramsey
 
Basic Computer Concepts
Basic Computer ConceptsBasic Computer Concepts
Basic Computer Concepts
Reynz Anario
 
Control unit
Control  unitControl  unit
Control unit
Sameer Patil
 
BASIC COMPUTER ARCHITECTURE
BASIC COMPUTER ARCHITECTURE BASIC COMPUTER ARCHITECTURE
BASIC COMPUTER ARCHITECTURE
Himanshu Sharma
 
Raspberry Pi (Introduction)
Raspberry Pi (Introduction)Raspberry Pi (Introduction)
Raspberry Pi (Introduction)
Mandeesh Singh
 
COMPUTER MEMORY : TYPES & FUNCTIONS
COMPUTER MEMORY : TYPES & FUNCTIONSCOMPUTER MEMORY : TYPES & FUNCTIONS
COMPUTER MEMORY : TYPES & FUNCTIONS
Angel Mary George
 
Register & Memory
Register & MemoryRegister & Memory
Register & Memory
Education Front
 
CAO-Unit-I.pptx
CAO-Unit-I.pptxCAO-Unit-I.pptx
CAO-Unit-I.pptx
ClassicFUKRA
 
Chapter 4 The Processor
Chapter 4 The ProcessorChapter 4 The Processor
Chapter 4 The Processor
guest4f73554
 
3 computer hardware and fundamentals edited for 1st sem
3 computer hardware and fundamentals edited for 1st sem3 computer hardware and fundamentals edited for 1st sem
3 computer hardware and fundamentals edited for 1st sem
Vedpal Yadav
 
Computer architecture and organization
Computer architecture and organizationComputer architecture and organization
Computer architecture and organization
Tushar B Kute
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
Anuj Modi
 
0 introduction to computer architecture
0 introduction to computer architecture0 introduction to computer architecture
0 introduction to computer architecture
aamc1100
 
Instruction cycle with interrupts
Instruction cycle with interruptsInstruction cycle with interrupts
Instruction cycle with interrupts
Shubham Jain
 
Unit 4 ca-input-output
Unit 4 ca-input-outputUnit 4 ca-input-output
Unit 4 ca-input-output
BBDITM LUCKNOW
 
Central processing unit
Central processing unitCentral processing unit
Central processing unit
jyoti_lakhani
 
Chapter01Introducing Hardware
Chapter01Introducing HardwareChapter01Introducing Hardware
Chapter01Introducing Hardware
Patty Ramsey
 
Basic Computer Concepts
Basic Computer ConceptsBasic Computer Concepts
Basic Computer Concepts
Reynz Anario
 
BASIC COMPUTER ARCHITECTURE
BASIC COMPUTER ARCHITECTURE BASIC COMPUTER ARCHITECTURE
BASIC COMPUTER ARCHITECTURE
Himanshu Sharma
 
Raspberry Pi (Introduction)
Raspberry Pi (Introduction)Raspberry Pi (Introduction)
Raspberry Pi (Introduction)
Mandeesh Singh
 
COMPUTER MEMORY : TYPES & FUNCTIONS
COMPUTER MEMORY : TYPES & FUNCTIONSCOMPUTER MEMORY : TYPES & FUNCTIONS
COMPUTER MEMORY : TYPES & FUNCTIONS
Angel Mary George
 
Chapter 4 The Processor
Chapter 4 The ProcessorChapter 4 The Processor
Chapter 4 The Processor
guest4f73554
 

Similar to 03. top level view of computer function & interconnection (20)

APznzaboj9CF_9DQRT2HR-lWEYeLjr197Vw_ZUktUfDvP5Qqd8SL2ZSNwpIwVoC6MN9lqvglTXM11...
APznzaboj9CF_9DQRT2HR-lWEYeLjr197Vw_ZUktUfDvP5Qqd8SL2ZSNwpIwVoC6MN9lqvglTXM11...APznzaboj9CF_9DQRT2HR-lWEYeLjr197Vw_ZUktUfDvP5Qqd8SL2ZSNwpIwVoC6MN9lqvglTXM11...
APznzaboj9CF_9DQRT2HR-lWEYeLjr197Vw_ZUktUfDvP5Qqd8SL2ZSNwpIwVoC6MN9lqvglTXM11...
rohithzach
 
1.3.2 computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAK1.3.2 computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAK
Tabsheer Hasan
 
computer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAKcomputer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAK
Tabsheer Hasan
 
Computer System.ppt
Computer System.pptComputer System.ppt
Computer System.ppt
jguuhxxxfp
 
Computer organization and architecture|KTU
Computer organization and architecture|KTUComputer organization and architecture|KTU
Computer organization and architecture|KTU
ashlinpj36
 
Computer organization and architecture|KTU
Computer organization and architecture|KTUComputer organization and architecture|KTU
Computer organization and architecture|KTU
ashlinpj36
 
CMP 416-Architecture and system design.pdf
CMP 416-Architecture and system design.pdfCMP 416-Architecture and system design.pdf
CMP 416-Architecture and system design.pdf
ElvisAngelot
 
CPU ARCHITECTURE and COMPUTER PROGRAMS G
CPU ARCHITECTURE and COMPUTER PROGRAMS GCPU ARCHITECTURE and COMPUTER PROGRAMS G
CPU ARCHITECTURE and COMPUTER PROGRAMS G
akudzweisheguri
 
Unit2fit
Unit2fitUnit2fit
Unit2fit
Akshay Rathi
 
Computer organisation Module 1.ppt
Computer organisation Module 1.pptComputer organisation Module 1.ppt
Computer organisation Module 1.ppt
SoulReaper21
 
Basic structure of computers
Basic structure of computersBasic structure of computers
Basic structure of computers
Kumar
 
Basic structure of computers
Basic structure of computersBasic structure of computers
Basic structure of computers
Kumar
 
Chapter 3 Assembly level machine organization Assembly level machine organiza...
Chapter 3 Assembly level machine organization Assembly level machine organiza...Chapter 3 Assembly level machine organization Assembly level machine organiza...
Chapter 3 Assembly level machine organization Assembly level machine organiza...
shumawakjira26
 
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001
SOLOMONCHINAEMEUCHEA
 
ch 2_Component and function of computer .pptx
ch 2_Component and function of computer .pptxch 2_Component and function of computer .pptx
ch 2_Component and function of computer .pptx
Toyba2
 
MCA-UNIT 1 ppt that helps to study modern computer architecture
MCA-UNIT 1 ppt that helps to study modern computer architectureMCA-UNIT 1 ppt that helps to study modern computer architecture
MCA-UNIT 1 ppt that helps to study modern computer architecture
Chinni896500
 
oLecture09-Internal Organization of CPU.pptx
oLecture09-Internal Organization of CPU.pptxoLecture09-Internal Organization of CPU.pptx
oLecture09-Internal Organization of CPU.pptx
IsuriUmayangana
 
chapter1 -Basic co.pptjsjjsjdjxjdjdjdjjsjsjd
chapter1 -Basic co.pptjsjjsjdjxjdjdjdjjsjsjdchapter1 -Basic co.pptjsjjsjdjxjdjdjdjjsjsjd
chapter1 -Basic co.pptjsjjsjdjxjdjdjdjjsjsjd
freefire2619rowdy
 
Chapter 1 basic structure of computers
Chapter 1  basic structure of computersChapter 1  basic structure of computers
Chapter 1 basic structure of computers
Gurpreet Singh
 
chapter 1 -Basic Structure of Computers.ppt
chapter 1 -Basic Structure of Computers.pptchapter 1 -Basic Structure of Computers.ppt
chapter 1 -Basic Structure of Computers.ppt
sandeepPingili1
 
APznzaboj9CF_9DQRT2HR-lWEYeLjr197Vw_ZUktUfDvP5Qqd8SL2ZSNwpIwVoC6MN9lqvglTXM11...
APznzaboj9CF_9DQRT2HR-lWEYeLjr197Vw_ZUktUfDvP5Qqd8SL2ZSNwpIwVoC6MN9lqvglTXM11...APznzaboj9CF_9DQRT2HR-lWEYeLjr197Vw_ZUktUfDvP5Qqd8SL2ZSNwpIwVoC6MN9lqvglTXM11...
APznzaboj9CF_9DQRT2HR-lWEYeLjr197Vw_ZUktUfDvP5Qqd8SL2ZSNwpIwVoC6MN9lqvglTXM11...
rohithzach
 
1.3.2 computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAK1.3.2 computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAK
Tabsheer Hasan
 
computer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAKcomputer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAK
Tabsheer Hasan
 
Computer System.ppt
Computer System.pptComputer System.ppt
Computer System.ppt
jguuhxxxfp
 
Computer organization and architecture|KTU
Computer organization and architecture|KTUComputer organization and architecture|KTU
Computer organization and architecture|KTU
ashlinpj36
 
Computer organization and architecture|KTU
Computer organization and architecture|KTUComputer organization and architecture|KTU
Computer organization and architecture|KTU
ashlinpj36
 
CMP 416-Architecture and system design.pdf
CMP 416-Architecture and system design.pdfCMP 416-Architecture and system design.pdf
CMP 416-Architecture and system design.pdf
ElvisAngelot
 
CPU ARCHITECTURE and COMPUTER PROGRAMS G
CPU ARCHITECTURE and COMPUTER PROGRAMS GCPU ARCHITECTURE and COMPUTER PROGRAMS G
CPU ARCHITECTURE and COMPUTER PROGRAMS G
akudzweisheguri
 
Computer organisation Module 1.ppt
Computer organisation Module 1.pptComputer organisation Module 1.ppt
Computer organisation Module 1.ppt
SoulReaper21
 
Basic structure of computers
Basic structure of computersBasic structure of computers
Basic structure of computers
Kumar
 
Basic structure of computers
Basic structure of computersBasic structure of computers
Basic structure of computers
Kumar
 
Chapter 3 Assembly level machine organization Assembly level machine organiza...
Chapter 3 Assembly level machine organization Assembly level machine organiza...Chapter 3 Assembly level machine organization Assembly level machine organiza...
Chapter 3 Assembly level machine organization Assembly level machine organiza...
shumawakjira26
 
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001
SOLOMONCHINAEMEUCHEA
 
ch 2_Component and function of computer .pptx
ch 2_Component and function of computer .pptxch 2_Component and function of computer .pptx
ch 2_Component and function of computer .pptx
Toyba2
 
MCA-UNIT 1 ppt that helps to study modern computer architecture
MCA-UNIT 1 ppt that helps to study modern computer architectureMCA-UNIT 1 ppt that helps to study modern computer architecture
MCA-UNIT 1 ppt that helps to study modern computer architecture
Chinni896500
 
oLecture09-Internal Organization of CPU.pptx
oLecture09-Internal Organization of CPU.pptxoLecture09-Internal Organization of CPU.pptx
oLecture09-Internal Organization of CPU.pptx
IsuriUmayangana
 
chapter1 -Basic co.pptjsjjsjdjxjdjdjdjjsjsjd
chapter1 -Basic co.pptjsjjsjdjxjdjdjdjjsjsjdchapter1 -Basic co.pptjsjjsjdjxjdjdjdjjsjsjd
chapter1 -Basic co.pptjsjjsjdjxjdjdjdjjsjsjd
freefire2619rowdy
 
Chapter 1 basic structure of computers
Chapter 1  basic structure of computersChapter 1  basic structure of computers
Chapter 1 basic structure of computers
Gurpreet Singh
 
chapter 1 -Basic Structure of Computers.ppt
chapter 1 -Basic Structure of Computers.pptchapter 1 -Basic Structure of Computers.ppt
chapter 1 -Basic Structure of Computers.ppt
sandeepPingili1
 
Ad

Recently uploaded (20)

To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
Political History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptxPolitical History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Ad

03. top level view of computer function & interconnection

  • 1. 1 Chap-3 A Top Level View of Computer Function & Interconnection Ch-3  Topic: Single Processor Architecture  Reading: Stallings, Sections 3.1 through 3.3  COA
  • 2. Today’s Agenda  Computer Components  Computer Function  Interrupts – Types & Instruction Cycle  Multiple Interrupts  I/O Functions  Interconnection Structures
  • 3. Review of Three Key Concepts of von Neumann Architecture  Data and instructions in single read-write memory  Memory contents are addressable by location regardless of whether content is data or instruction  Execution of code is sequential from one instruction to the next unless a jump is encountered
  • 4. Hardwired Program  There is a small set of basic logic components that can be combined in various ways to store binary data and to perform arithmetic and logical operations on that data.  If there is a particular computation to be performed, a configuration of logic components designed specifically for that computation could be constructed.  We can think of the process of connecting the various components in the desired configuration as a form of programming. The resulting “program” is in the form of hardware and is termed a hardwired program.
  • 5. Hardwired Program  Customized H/W – the system accepts data & produces results.
  • 6. Program Concept  Just about any function can be realized with hardwired logic components (calculator)  Hardwired systems, however, are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead of re-wiring, supply a new set of control signals
  • 7. Instruction Interpreter Now we need a device to accept unique instruction codes and turn them into control signals for the arithmetic and logic hardware.
  • 8. How Can We Create a Program?  Each step activates a set of control signals to control general purpose logic  Each step is an arithmetic or logical operation  For each operation, a different set of control signals is needed  Program equals the sequence of steps  Programming is no longer a case of rewiring
  • 9. How Can We Create a Program?  Programming is now much easier. Instead of rewiring the hardware for each new program, all we need to do is provide a new sequence of codes.  Each code is, in effect, an instruction, and part of the hardware interprets each instruction and generates control signals.  To distinguish this new method of programming, a sequence of codes or instructions is called software.
  • 10. Encoding Instructions  Unique binary patterns identify operation to be performed.  Examples:  Simple addition machine in Figure 3.5 on page 89 of textbook  A useful link for Assembly language help  http://www.plantation-productions.com/Webster/  This URL may be used in coming classes.
  • 18. Computer Components: Detail  The CPU exchanges data with memory. For this purpose, it typically makes use of two internal (to the CPU) registers:  (1). a memory address register (MAR), which specifies the address in memory for the next read or write,  (2). a memory buffer register (MBR), which contains the data to be written into memory or receives the data read from memory.  Similarly, an I/O address register (I/O AR) specifies a particular I/O device.  An I/O buffer (I/O BR) register is used for the exchange of data between an I/O module and the CPU.
  • 19. Simplified 2-Step Instruction Cycle  Instruction cycle is not the same thing as a clock cycle  Two steps:  Fetch  Execute
  • 20. Fetch Cycle  Program Counter (PC) holds address of next instruction to fetch  Processor fetches instruction from memory location pointed to by PC  Increment PC unless instructed otherwise  Instruction loaded into Instruction Register (IR)  Processor interprets instruction and performs required actions  What problems can you predict happening in this cycle?
  • 21. Execute Cycle  Processor-memory  data transfer between CPU and main memory  Processor-I/O  Data transfer between CPU and I/O module  Data processing  Some arithmetic or logical operation on data
  • 22. Execute Cycle  Control  Alteration of sequence of operations, e.g. jump  e.g. the processor may fetch an instruction from location 149, which specifies that the next instruction be from location 182. The processor will remember this fact by setting the program counter to 182.Thus, on the next fetch cycle, the instruction will be fetched from location 182 rather than 150.  Combination of above
  • 24. Instruction Cycle State Diagram - Explanation  Instruction address calculation (iac): Determine the address of the next instruction to be executed. Usually, this involves adding a fixed number to the address of the previous instruction.  Instruction fetch (if): Read instruction from its memory location into the processor.  Instruction operation decoding (iod): Analyze instruction to determine type of operation to be performed and operand(s) to be used.  Operand address calculation (oac): If the operation involves reference to an operand in memory or available via I/O, then determine the address of the operand.
  • 25. Instruction Cycle State Diagram - Explanation  Operand fetch (of): Fetch the operand from memory or read it in from I/O.  Data operation (do): Perform the operation indicated in the instruction.  Operand store (os): Write the result into memory or out to I/O.
  • 26. Interrupts  No special code is needed in main code  Interrupt Service Routines (ISR) handle condition  Interrupts may be disabled; pending interrupts serviced as soon as interrupts are enabled again  Global enabling – affects all maskable interrupts  Local enabling – affects individual interrupts
  • 27. Types of Interrupts  Program – Something that occurs as a result of program execution such as illegal instructions, arithmetic overflow, divide by zero, or memory handling error  Timer – Generated by one of the processor's internal timers so that the processor can perform some time- scheduled task  I/O – Generated by an I/O controller to request service from the processor such as keyboard, mouse, NIC, disk drive  Hardware failure – signifies some error condition with the hardware
  • 28. Multiple Interrupts  Disable interrupts  Processor can ignore further interrupts whilst processing one interrupt or interrupts may be nested  Ignored interrupts remain pending and are checked after first interrupt has been processed  Define priorities  Low priority interrupts can be interrupted by higher priority interrupts  When higher priority interrupt has been processed, processor returns to previous interrupt
  • 30. CPU Context Switch From Process to Process
  • 33. Interrupt Cycle (continued)  Added to instruction cycle  Processor checks for interrupt  If no interrupt, fetch next instruction  If interrupt pending:  Suspend execution of current program  Save context on stack (typically registers, PC, flags, etc.)  Set PC to start address of interrupt handler routine  Process interrupt  Restore context and continue interrupted program
  • 34. Transfer of Control via Interrupts
  • 35. Program Timing -- Short I/O Wait
  • 36. Program Timing -- Long I/O Wait
  • 38. Multiple Interrupts - Sequential
  • 40. Time Sequence of Multiple Interrupts
  • 41. I/O Modules  I/O modules occasionally require attention, usually in the form of a data transfer  Processor can simply transfer data back and forth with the device as if it were memory  Alternatively, processor can grant I/O module permission to write directly to memory – Direct Memory Access (DMA) – Interrupt occurs when DMA is complete