Parallel processing and virtual machines
도입됨
14:50
RISC, 파이프라인 및 논리 회로
두 칩 설계자가 프로그램을 빠르게 실행해야 한다는 같은 문제에 직면합니다. 한 사람은 각 명령이 많은 일을 하도록 강력한 명령어를 만들자고 합니다. 다른 사람은 단순하게 유지하자고 합니다…
영어 내레이션 · 영어와 중국어 자막 전환 가능
이 수업의 내용
| English | 의미 |
|---|---|
| physical server | A real computer that provides services or resources to other computers. |
| application/ˌæplɪˈkeɪʃn/ | A program designed to perform a particular task for a user. |
| rack/ræk/ | A frame that holds computer equipment in an organised way. |
| virtual machines/ˈvɜːtʃuːəl məˈʃiːnz/ | 가상 머신 |
| physical hosts | Real computers that provide resources for virtual machines to run. |
| processor/ˈprəʊsesə/ | The component that executes instructions and performs the operations of a computer or similar system. |
| memory/ˈmeməri/ | The part of a computer that holds data and programs currently in use. |
| disks | Storage media that allow data to be read directly from known positions. |
| parallelism/ˈpærəlelɪzəm/ | 병렬성 |
| system architectures | Ways of organising a computer system and how its parts work together. |
| processing elements | Parts of a computer that carry out instructions and process data. |
| Flynn's taxonomy/flɪnz tækˈsɒnəmi/ | A way to group computer systems by how they handle instructions and data. |
| SIMD/ˈsɪmdiː/ | 단일 명령어 다중 데이터 |
| instruction/ɪnˈstrʌkʃn/ | A command that tells the processor what action to perform. |
| MIMD/ˈmɪmdiː/ | 다중 지령 다중 데이터 |
| massively parallel/ˈmæsɪvli ˈpærəlel/ | 대규모 병렬 처리 |
| distributed memory/ˈdɪstrɪbjuːtɪd ˈmeməri/ | 분산 메모리 |
| clock/klɒk/ | The number of timing cycles a processor makes each second. |
| execution environment | The resources and conditions a program needs to run. |
| system VM | A software-based virtual computer that runs a complete guest operating system. |
| process VM | A software-based environment that runs one program's portable code. |
| guest operating system/ɡest ˈɒpəreɪtɪŋ ˈsɪstəm/ | An operating system running inside a virtual machine rather than directly controlling the physical host hardware. |
| portable code | Code that can run on different platforms, such as bytecode run by a virtual machine. |
| emulator | Software or hardware that imitates another computer system so its programs can run. |
| isolation/ˌaɪsəˈleɪʃn/ | Keeping systems separate to limit how much actions in one can affect another. |
| portability | The ability of a program to run on different platforms. |
| hypervisor/ˌhaɪpəˈvaɪzə/ | 하이퍼바이저 |
| legacy system | An older computer system that is still used, often because it remains necessary. |
| server consolidation | Moving work from several servers onto fewer physical computers. |
| sandboxing/ˈsændbɒksɪŋ/ | 샌드박스링 |
| language VM | A software environment that runs a program's portable code on a host computer. |
| bytecode/ˈbaɪtkəʊd/ | 바이트코드 |
| machine code/məˈʃiːn kəʊd/ | Instructions encoded in binary form that a processor can execute directly. |
| runtime safety | Protection provided by checking what a program does while it runs. |
| just-in-time compilation/dʒʌst ɪn taɪm ˌkɒmpɪˈleɪʃn/ | 지연 컴파일 |
| hot code | Parts of a program that run often and can be compiled for faster execution. |
| native instructions | Commands that a computer's processor can execute directly. |
| hardware/ˈhɑːdweə/ | The physical parts of a computer system that can be touched. |
| network/ˈnetwɜːk/ | A set of connected devices or nodes that can exchange information. |
| platform/ˈplætfɔːm/ | The combination of processor and operating system on which a program runs. |
| shared resources | Computer resources used by more than one program or virtual machine. |
| single point of failure/ˈsɪŋɡl pɔɪnt ɒv ˈfeɪlɪə/ | One part whose failure can cause the whole system to stop working. |
한 대의 컴퓨터가 스무네 대를 연상시키는 경우
- 과거에는 한 application마다 물리적 서버 하나를 구매했습니다. 메일용, 웹사이트용, 회계 용도별로 각기 다른 서버를 사용했죠. 각 서버는 용량의 약 8%만 사용하더라도, 냉각이 필요한 랙에 full power를 소모하며 작동했습니다.
- 이후 서버들은 더 이상 기계적 장치가 아닌 파일로 변했습니다. 현재 세 대의 물리적 호스트 위에 스무네 개의 **가상 머신(Virtual Machine)**이 실행되고 있으며, 각각이 자체적인 프로세서, 메모리, 디스크를 가진 것처럼 인식하고 있습니다.
- 절감 효과는 전력뿐만이 아닙니다. 위험한 변경 전 가상 머신을 스냅샷으로 저장하거나, 실행 중인 상태로 다른 호스트로 복사할 수 있으며, 해킹 당하면 즉시 파기할 수도 있습니다.
- 이 교훈은 병렬성과 가상 머신입니다. 두 시스템 아키텍처의 차이점과 VM이 가져다주는 비용 및 이점을 이해하는 것입니다.

병렬 아키텍처, 간략히 보기
- **병렬성(Parallelism)**은 여러 처리 요소가 동시에 작업하는 것을 의미합니다. 플린 분류법은 이러한 형태를 명명합니다. SIMD는 하나의 명령어를 여러 데이터 항목에 적용하고, MIMD는 서로 다른 데이터에 다른 명령어를 실행합니다.
- 대규모 병렬 기계는 MIMD 아키텍처를 수천 개의 프로세서에 확장하며, 각 프로세서는 자체적인 분산 메모리를 가지고 메시지를 통해 통신합니다.
- 속도는 더 이상 클럭 주파수를 높이는 데서 나오지 않습니다. 열 관리의 한계로 인해 클럭 상향이 되었기 때문입니다. 대신 동시에 수행하는 작업을 늘리는 것이 핵심입니다. 이 페이지에 소개된 모든 아키텍처는 이 질문에 대한 답입니다.

동시에 다른 명령어, 다른 데이터를 처리

SIMD means:
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Single Instruction, Multiple Data — e.g. a GPU running the same operation on thousands of pixels.
Match each of Flynn's categories to an example.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
Flynn classifies by how many instruction and data streams run at once: SISD, SIMD, MIMD (and the rare MISD).
A massively parallel computer uses:
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Massively parallel systems (supercomputers) link thousands of processors with distributed memory over a fast network.
가상 머신이 무엇인지
- **가상 머신(Virtual Machine)**은 전체 컴퓨터의 소프트웨어 에뮬레이션입니다. 내부에서 실행되는 소프트웨어는 실제처럼 보이는 프로세서, 메모리, 디스크를 보지만, 이들은 호스트 소프트웨어에 의해 제공되고 관리됩니다.
- 두 가지 유형이 있으며, 시험에서는 이를 구분합니다. **시스템 VM(System VM)**은 완전한 게스트 운영 체제를 실행하고, **프로세스 VM(Process VM)**은 단일 프로그램의 휴대용 코드를 실행합니다.
- 어느 쪽도 더 빠른 기계의 에뮬레이션이 아닙니다. VM의 목적은 격리(Isoation)와 portability이며, 속도 향상이 아닙니다.
컴퓨팅 개념 실험실
Classify concrete examples by the computing idea they demonstrate.
What is a virtual machine?
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
The point is emulation and isolation, not speed. A system VM runs a whole guest OS; a process VM runs one program's bytecode.
시스템 가상 머신
- **하이퍼바이저(Hypervisor)**는 가상 머신을 생성하고 관리하는 소프트웨어로, 호스트의 실제 프로세서, 메모리, 디스크를 분할하여 각 VM에게 할당하고 서로 격리되도록 유지합니다.
- 각 VM은 **자신의 게스트 운영 체제(Guest OS)**를 부팅하므로, 하나의 호스트 위에서 Windows, Linux, 구형 레거시 시스템을 나란히 실행할 수 있습니다.
- 활용 예: 하나의 기계에서 다양한 운영 체제 실행; 서버 통합(Server Consolidation), 저사용률 물리 서버들을 하나로 대체; 샌드박싱(Sandboxing), 위험하거나 신뢰할 수 없는 소프트웨어를 격리시켜 호스트에 접근하지 못하게 함; 스냅샷 기능으로Known state로 롤백 가능.

여러 가상 머신을 수용하는 호스트 랙

A hypervisor is used to:
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
A hypervisor manages system VMs, letting several guest operating systems share one physical machine.
A system VM (managed by a hypervisor) runs a whole guest operating system, whereas a process VM like the JVM just runs one program's portable bytecode.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
System VMs share one physical machine among several guest OSes; process VMs give "write once, run anywhere" for a single program.
The software that creates and manages several system VMs on one host is called a ____.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
It divides the host's real hardware between the guests and keeps each isolated, which is what makes sandboxing and consolidation possible.
프로세스 가상 머신
- 프로세스 VM, 또는 언어 VM은 호스트의 기계어 대신 **휴대용 바이트코드(Bytecode)**로 작성된 단일 프로그램을 실행합니다. 자바 가상의 머신(Java Virtual Machine)과 .NET CLR이 그 예입니다.
- 장점: 호환성, 동일한 바이트코드가 VM이 있는 어디서나 실행되므로 "한 번 작성하면 어디서나 실행"; 러닝타임 안전성, VM이 코드 동작을 검사하므로; 그리고 hot code의 JIT 컴파일, 네이티브 명령으로 변환하여 장시간 실행되는 프로그램이 네이티브 속도 근접하게 함.
- 단점: 프로그램과 하드웨어 사이에 추가 계층이 생기고, VM이 먼저 설치되지 않으면 프로그램이 실행되지 않습니다.

Which are benefits of a process (language) VM such as the JVM? Select 모든 that apply.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
The VM must be present; that is the cost of the portability. Portability, safety and JIT are the benefits.
worked example: 어떤 종류의 VM인가
- 보안 팀이 회사 네트워크에 위험을 주입하지 않고 의심스러운 이메일 첨부 파일을 열어야 한다. 시스템 VM: 게스트 OS가 하이퍼바이저에 의해 격리되어 있어 맬웨어가 호스트에 도달할 수 없으며, afterwards 스냅샷을 복원하여 모든 활동을 삭제합니다.
- 개발자가 재컴파일 없이 Windows, macOS, Linux에서 하나의 컴파일된 프로그램을 실행하고 싶다. 프로세스 VM: 프로그램이 바이트코드로 컴파일되며 각 플랫폼의 VM이 이를 실행합니다.
- Situation이 요구하는 성질인 격리(Isolation) 또는 portability를 명시한 뒤, 해당 VM의 종류를 언급하십시오.
Put the consequences of one physical host failing, in order.
난이도 3/5 · 200코인 + 오늘 첫 완료 시 작은 보너스 추가
Consolidation concentrates the risk: one host is a single point of failure for everything it carries. That is the limitation to state.
worked example: 장점과 한계
- 가상 머신을 사용하여 회사의 물리적 서버를 교체할 때의 장점 두 가지와 한계 두 가지를 설명하시오. [4]
- 장점: 여러 서버가 하나의 물리적 호스트에서 실행되므로 하드웨어, 전력, 냉각 비용이 감소합니다; 또한 각 VM은 격리되어 있으므로 해킹되거나 crashed된 서버가 다른 서버에 영향을 미치지 않으며, 스냅샷으로부터 복원할 수 있습니다.
- 제한사항: VM들이 공유되는 호스트의 실제 프로세서, 메모리 및 디스크를 사용하므로 전용 하드웨어보다 성능이 낮으며, 한 VM이busy하면 다른 VM들은 starve될 수 있습니다; 또한 호스트에 오류가 발생하면 모든 VM이 동시에 고장납니다.
- 각 2개씩, 그리고 각각이 단순한 라벨이 아닌 결과(Consequence)이어야 합니다.
놓칠 수 있는 점
- 하이퍼바이저는 시스템 VM을 관리합니다. 게스트 OS나 호스트 자체 OS가 아닙니다.
- 프로세스 VM은 바이트코드를 실행하며, 이는 기계어와 다릅니다. 이것이 portability의 이유입니다.
- VM의 한계는 **
- "샌드박싱"에는 그 결과물이 필수적입니다: 위험한 소프트웨어가 호스트(host)로부터 격리되므로 호스트를 손상시키거나 접근할 수 없습니다.
이해했습니다
- 병렬 처리는 클럭 속도 한계를 해결합니다: SIMD는 하나의 명령어를 여러 데이터에 적용하고, MIMD는 여러 명령어를 수행하며, 대규모 병렬은 분산 메모리를 가진 수천 개의 프로세서를 사용합니다.
- 가상 머신은 전체 컴퓨터를 소프트웨어로 에뮬레이션한 것입니다.
- 시스템 VM은 하이퍼바이저 아래에서 완전한 게스트 OS를 실행합니다: 하나의 기계 위에서 다른 운영체제를 실행하거나, 서버 통합을 수행하며, 샌드박싱과 스냅샷 기능을 제공합니다.
- 프로세스 VM은 런타임 안전성과 ** Just-in-Time 컴파일**을 사용하여 포터블 바이트코드를 실행합니다. 단점은 추가 레이어가 생성되고 호스트 자원을 공유하며, 하나의 호스트가 고장 나면 해당 호스트의 모든 VM이 함께 실패한다는 점입니다.
어떤 문제가 있었나요? 사이트 팀만 이 내용을 볼 수 있습니다.