본문 바로가기
Computer Architecture/컴퓨터구조[01]

[컴퓨터구조] 1129 (1)

by leziwn.cs 2023. 11. 29.
Virtual Machines

: 소프트웨어적으로 만들어낸 가상 컴퓨터

--> host 컴퓨터가 guest 운영체제를 따라할 수 있도록 한다.

  • Resource sharing: virtualized HW resource를 guest OS와 host OS가 공유한다.

 

Virtual Machine Monitor (VMM)

: VMM handles real I/O devices.

  • Emulates generic virtual I/O devices for guest.
  • Guest 코드는 native machine에서 user mode로 동작한다.

Guest 코드는 native machine에서 user mode로 동작한다.

 

Example: Timer Virtualization
  • Native machine: timer interrupt --> OS suspends current process, handles interrupt, select and resumes next process.
  • Virtual Machine Monitor: VMM suspends current VM, handles interrupt, selects and resumes next VM.
    --> VMM이 virtual timer 역할을 하고, interrupt handler 역할을 한다.

 

Instruction Set Support

User mode

▶ System mode (= Kernel mode)

  • Privileged instructions only available in system mode.
  • All physical resources only accessible using privileged instructions.

 


Cache Control

Cache Control

 

Interface Signals

Interface Signals

 

Finite State Machines (FSM)

Finite State Machines (FSM)

 

Cache Controller FSM

Cache Controller FSM

 

Cache Coherence Problem

: 두 개의 CPU가 physical address space를 공유한다고 생각해보자.

  • Write-through caches: 캐시, 메모리에 둘 다 쓴다.

Cache Coherence Problem

 

Cache Coherence Protocols
  • Cache coherence: 가장 최근에 wirte한 값을 read한다.

▶ Cache coherence를 유지하기 위한 프로토콜:

Cache Coherence Protocols

 

Invalidating Snooping Protocols

Invalidating Snooping Protocols

 

Memory Consistency

Memory Consistency

 

Multi-level Caches

Multi-level Caches

 

2-Level, 3-Level TLB Organization
  • TLB: 프로세스별 page table을 위한 캐시 

--> Virtual memory에 접근하여, Physical memory 주소를 찾기 위한 page table을 보기 위해 메모리에 접근해야 하는 delay를 막아준다.

2-Level, 3-Level TLB Organization

 


Concluding Remarks
  • Fast memories are small, large memories are slow. --> Caching
  • Principle of locality: Programs use a small part of their memory space frequently.
  • Memory hierarchy: L1 cache - L2 cache - L3 cache ------ DRAM memory ------ Disk
  • Memory system design is critical for multiprocessors.

 

 

 

 

 

출처: 이화여자대학교 이형준교수님 컴퓨터구조