t03160020220124039 computeroverview 1-1

26

Upload: dedy-supriyadi

Post on 14-Dec-2014

49 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: T03160020220124039 computeroverview 1-1
Page 2: T03160020220124039 computeroverview 1-1

Computer System Overview Week 1 - 1

Subject : T0316 Operating System

Page 3: T03160020220124039 computeroverview 1-1

ObjectivesAt the end of this lecture, students are able to:• LO1: Describe the basic elements of a computer

system and their interrelationship• LO1: Describe the computer Instruction Cycle• LO1: Describe the concepts of Interrupts, Memory

Management and I/O types• LO1: Describe different type of cache memory

Bina Nusantara University 3

Page 4: T03160020220124039 computeroverview 1-1

Sub Topics

• Basic Elements• Instruction Cycle• Interrupt• Memory• I/O Types

Bina Nusantara University 4

Page 5: T03160020220124039 computeroverview 1-1

Bina Nusantara University

•Manage resources•Provides a set of services to system users (User Interface)•Manages secondary memory and I/O devices

Operating System

Page 6: T03160020220124039 computeroverview 1-1

Basic Elements• Processor• Main Memory

– referred to as real memory or primary memory– volatile

• I/O modules– secondary memory devices– communications equipment– terminals

• System bus– communication among processors, memory,

and I/O modules

Bina Nusantara University 6

Page 7: T03160020220124039 computeroverview 1-1

Computer Architecture (1)

Bina Nusantara University 7

Operating System-Internal and Design Concept - Stallings

Page 8: T03160020220124039 computeroverview 1-1

Computer Architecture(2)

Bina Nusantara University 8

Operating System-Internal and Design Concept - Stallings

The program counter (PC) keeps track of where to find the next instruction so that a copy of the instruction can be placed in the current instruction register (IR)

The current instruction register holds the instruction that is to be executed.

The memory address register (MAR) is used to hold the memory address that contains either the next piece of data or an instruction that is to be used.

Page 9: T03160020220124039 computeroverview 1-1

Computer Architecture(3)

Bina Nusantara University 9

Operating System-Internal and Design Concept - Stallings

The central processor contains the arithmetic-logic unit (ALU) and the control unit. The ALU is where data is processed. The control unit fetches instructions from memory, decodes them and synchronizes the operations before sending signals to other parts of the computer.

The accumulator is in the arithmetic unit, the PC and the IR are in the control unit and the MAR and MBR are in the processor

Page 10: T03160020220124039 computeroverview 1-1

Instruction Cycle

Bina Nusantara University 10

Operating System-Internal and Design Concept - Stallings

Page 11: T03160020220124039 computeroverview 1-1

Fetch and Execute (1)

Bina Nusantara University 11

• The processor fetches the instruction from memory

• Program counter (PC) holds address of the instruction to be fetched next

• Program counter is incremented after each fetch

Page 12: T03160020220124039 computeroverview 1-1

Fetch and Execute (2)

Bina Nusantara University 12

• Fetched instruction is placed in the instruction register

• Types of instructions– Processor-memory

• transfer data between processor and memory

– Processor-I/O• data transferred to or from a peripheral device

– Data processing• arithmetic or logic operation on data

– Control• alter sequence of execution

Page 13: T03160020220124039 computeroverview 1-1

Bina Nusantara University 13

Pipelining

Superscalar

Execution Cycle

Page 14: T03160020220124039 computeroverview 1-1

Interrupt

Bina Nusantara University 14

• An interruption of the normal sequence of execution

• Improves processing efficiency• Allows the processor to execute other

instructions while an I/O operation is in progress• A suspension of a process caused by an event

external to that process and performed in such a way that the process can be resumed

Page 15: T03160020220124039 computeroverview 1-1

Types of Interrupt

Bina Nusantara University 15

• Program– arithmetic overflow– division by zero– execute illegal instruction– reference outside user’s memory space

• Timer• I/O• Hardware failure

Page 16: T03160020220124039 computeroverview 1-1

Interrupt Handler

Bina Nusantara University 16

• A program that determines nature of the interrupt and performs whatever actions are needed

• Control is transferred to this program• Generally part of the operating system

Page 17: T03160020220124039 computeroverview 1-1

Instruction Cycle with interrupt

Bina Nusantara University 17

Operating System-Internal and Design Concept - Stallings

Page 18: T03160020220124039 computeroverview 1-1

Interrupt Cycle

Bina Nusantara University 18

• Processor checks for interrupts• If no interrupts fetch the next instruction for the

current program• If an interrupt is pending, suspend execution of

the current program, and execute the interrupt handler

Page 19: T03160020220124039 computeroverview 1-1

Memory• Memory Hierarchy

Bina Nusantara University 19

Operating System-Internal and Design Concept - Stallings

Highest Speed

Lowest Speed

Page 20: T03160020220124039 computeroverview 1-1

Disk Cache

Bina Nusantara University 20

• A portion of main memory used as a buffer to temporarily to hold data for the disk

• Disk writes are clustered• Some data written out may be referenced again.

The data are retrieved rapidly from the software cache instead of slowly from disk

Page 21: T03160020220124039 computeroverview 1-1

Cache Memory (1)

Bina Nusantara University 21

• Invisible to operating system• Increase the speed of memory• Processor speed is faster than memory speed

Page 22: T03160020220124039 computeroverview 1-1

Cache Memory (2)

Bina Nusantara University 22

Operating System-Internal and Design Concept - Stallings

Page 23: T03160020220124039 computeroverview 1-1

Types of Cache Memory (1)

Bina Nusantara University 23

• There are generally 3 types of cache memory in modern computer systems.

– L1 Cache is typically built into the architecture of the CPU. For Example the Pentium has a 16K cache. The PowerPC G5 has a 64K L1 cache.

Typically L1 cache is broken down into two separate cache. One is used to hold instructions and the other to hold data.

In the Sun4m architecture they are both 16kb.

Page 24: T03160020220124039 computeroverview 1-1

Types of Cache Memory (1)

Bina Nusantara University 24

– L2 Cache is fast access memory (SRAM) which typically sits between the CPU and main memory. It can range between 256 - 4 Megabytes. This is typically part of the architecture.

– L3 Cache is typically known as high access memory between the motherboard and CPU.

Page 25: T03160020220124039 computeroverview 1-1

Types of Cache Memory (3)

Bina Nusantara University 25

• The idea of cache memory is to store frequently used instructions or data in accessible memory locations.

• This is predicted by internal algorithms and prediction in the CPU or operating system cache manager.

• The idea is to reduce the amount of time in contention i.e. going through the bus to main memory to reference an address.

Page 26: T03160020220124039 computeroverview 1-1

The End

Bina Nusantara University 26