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.
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
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

More Related Content

What's hot

Computer organization and architecture.pptx
Computer organization and architecture.pptxComputer organization and architecture.pptx
Computer organization and architecture.pptx
DIPTONILRAKSHIT
 
02 Computer Evolution And Performance
02  Computer  Evolution And  Performance02  Computer  Evolution And  Performance
02 Computer Evolution And Performance
Jeanie Delos Arcos
 
Io techniques & its types
Io techniques & its typesIo techniques & its types
Io techniques & its types
Nehal Naik
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organization
Mazin Alwaaly
 
Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
Fraboni Ec
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
Vinit Raut
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
Kamal Acharya
 
Processor architecture
Processor architectureProcessor architecture
Processor architecture
Muuluu
 
Input output in computer Orgranization and architecture
Input output in computer Orgranization and architectureInput output in computer Orgranization and architecture
Input output in computer Orgranization and architecture
vikram patel
 
Control unit
Control unitControl unit
Control unit
Syed Zaid Irshad
 
Chapter 2 - Computer Evolution and Performance
Chapter 2 - Computer Evolution and PerformanceChapter 2 - Computer Evolution and Performance
Chapter 2 - Computer Evolution and Performance
César de Souza
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
PreethiSureshkumar1
 
Basic computer architecture
Basic computer architectureBasic computer architecture
Basic computer architecture
Daffodil International University
 
Parallel computing chapter 3
Parallel computing chapter 3Parallel computing chapter 3
Parallel computing chapter 3
Md. Mahedi Mahfuj
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1
Anwal Mirza
 
Chapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and InterconectionChapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and Interconection
César de Souza
 
DMA Versus Polling or Interrupt Driven I/O
DMA Versus Polling or Interrupt Driven I/ODMA Versus Polling or Interrupt Driven I/O
DMA Versus Polling or Interrupt Driven I/O
sathish sak
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
Subhasis Dash
 
Cpu organisation
Cpu organisationCpu organisation
Cpu organisation
Er Sangita Vishwakarma
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
Kamal Acharya
 

What's hot (20)

Computer organization and architecture.pptx
Computer organization and architecture.pptxComputer organization and architecture.pptx
Computer organization and architecture.pptx
 
02 Computer Evolution And Performance
02  Computer  Evolution And  Performance02  Computer  Evolution And  Performance
02 Computer Evolution And Performance
 
Io techniques & its types
Io techniques & its typesIo techniques & its types
Io techniques & its types
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organization
 
Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
Processor architecture
Processor architectureProcessor architecture
Processor architecture
 
Input output in computer Orgranization and architecture
Input output in computer Orgranization and architectureInput output in computer Orgranization and architecture
Input output in computer Orgranization and architecture
 
Control unit
Control unitControl unit
Control unit
 
Chapter 2 - Computer Evolution and Performance
Chapter 2 - Computer Evolution and PerformanceChapter 2 - Computer Evolution and Performance
Chapter 2 - Computer Evolution and Performance
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
Basic computer architecture
Basic computer architectureBasic computer architecture
Basic computer architecture
 
Parallel computing chapter 3
Parallel computing chapter 3Parallel computing chapter 3
Parallel computing chapter 3
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1
 
Chapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and InterconectionChapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and Interconection
 
DMA Versus Polling or Interrupt Driven I/O
DMA Versus Polling or Interrupt Driven I/ODMA Versus Polling or Interrupt Driven I/O
DMA Versus Polling or Interrupt Driven I/O
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
 
Cpu organisation
Cpu organisationCpu organisation
Cpu organisation
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
 

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

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
 
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 System.ppt
Computer System.pptComputer System.ppt
Computer System.ppt
jguuhxxxfp
 
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
 
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
 
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
 
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
 
UNIT I.ppt
UNIT I.pptUNIT I.ppt
UNIT I.ppt
JEEVANANTHAMG6
 
chapter1-basicstructureofcomputers.ppt
chapter1-basicstructureofcomputers.pptchapter1-basicstructureofcomputers.ppt
chapter1-basicstructureofcomputers.ppt
KarrarIbrahimAbdAlam
 
Bca examination 2015 csa
Bca examination 2015 csaBca examination 2015 csa
Bca examination 2015 csa
Anjaan Gajendra
 
Operating system
Operating systemOperating system
Operating system
raj732723
 
Bc0040
Bc0040Bc0040
Bc0040
hayerpa
 
Chapter1 basic structure of computers
Chapter1  basic structure of computersChapter1  basic structure of computers
Chapter1 basic structure of computers
jismymathew
 
OSLecture1.ppt
OSLecture1.pptOSLecture1.ppt
OSLecture1.ppt
AkkiiDerp
 
Ass#1 ramirez.cv (cs3112 os)
Ass#1 ramirez.cv (cs3112 os)Ass#1 ramirez.cv (cs3112 os)
Ass#1 ramirez.cv (cs3112 os)
charize
 
computer organization and architecture notes
computer organization and architecture notescomputer organization and architecture notes
computer organization and architecture notes
Upasana Talukdar
 

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

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
 
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
 
Computer System.ppt
Computer System.pptComputer System.ppt
Computer System.ppt
 
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
 
Unit2fit
Unit2fitUnit2fit
Unit2fit
 
Computer organisation Module 1.ppt
Computer organisation Module 1.pptComputer organisation Module 1.ppt
Computer organisation Module 1.ppt
 
Basic structure of computers
Basic structure of computersBasic structure of computers
Basic structure of computers
 
Basic structure of computers
Basic structure of computersBasic structure of computers
Basic structure of computers
 
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
 
Chapter 1 basic structure of computers
Chapter 1  basic structure of computersChapter 1  basic structure of computers
Chapter 1 basic structure of computers
 
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
 
UNIT I.ppt
UNIT I.pptUNIT I.ppt
UNIT I.ppt
 
chapter1-basicstructureofcomputers.ppt
chapter1-basicstructureofcomputers.pptchapter1-basicstructureofcomputers.ppt
chapter1-basicstructureofcomputers.ppt
 
Bca examination 2015 csa
Bca examination 2015 csaBca examination 2015 csa
Bca examination 2015 csa
 
Operating system
Operating systemOperating system
Operating system
 
Bc0040
Bc0040Bc0040
Bc0040
 
Chapter1 basic structure of computers
Chapter1  basic structure of computersChapter1  basic structure of computers
Chapter1 basic structure of computers
 
OSLecture1.ppt
OSLecture1.pptOSLecture1.ppt
OSLecture1.ppt
 
Ass#1 ramirez.cv (cs3112 os)
Ass#1 ramirez.cv (cs3112 os)Ass#1 ramirez.cv (cs3112 os)
Ass#1 ramirez.cv (cs3112 os)
 
computer organization and architecture notes
computer organization and architecture notescomputer organization and architecture notes
computer organization and architecture notes
 

Recently uploaded

Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
Kavitha Krishnan
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 

Recently uploaded (20)

Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 

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.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 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
  • 29.
  • 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