리눅스 커널 파일시스템 기본 [1]

이미지
파일시스템이란 하드디스크, SSD, 플래시 메모리와 같은 저장장치 위에 파일과 디렉터리를 체계적으로 정리(organize)하는 방법을 말합니다. 파일시스템의 종류는 매우 다양합니다 (FAT, ext4, btrfs, NTFS 등). 그리고 한 대의 컴퓨터에서 같은 파일시스템 종류가 여러 개 동시에 사용될 수도 있습니다. 파일시스템마다 파일과 디렉터리, 사용자 데이터, 그리고 내부적으로 사용하는 메타데이터를 관리하는 방식이 서로 다르긴 하지만, 거의 모든 파일시스템에 공통적으로 사용되는 몇 가지 기본 개념들이 있습니다 (이 중 일부 개념은 저장장치(storage)와 메모리 양쪽에 존재하고, 일부는 메모리에만 존재합니다.): 슈퍼블록(superblock) : 해당 파일시스템의 기본 정보를 담고 있습니다. 예를 들어 블록 크기, 루트 아이노드, 파일시스템 전체 크기 같은 정보죠. 슈퍼블록은 저장장치와 메모리 모두에 존재하는데, 메모리에는 속도 향상을 위한 캐싱 용도로 복사되어 있습니다. 파일(file) :현재 열려있는 파일에 관한 정보(예: 현재 읽기 위치 등)를 담고 있는데, 이 정보는 메모리에만 존재합니다. 아이노드(inode) : 아이노드는 디스크에 저장된 파일을 고유하게 식별하는 역할을 합니다. 아이노드는 파일 크기, 접근 권한, 파일 종류 등 다양한 속성도 함께 가지고 있죠. 이 아이노드는 저장장치와 메모리 양쪽에 존재하며, 메모리에는 캐시 목적 등으로 복사되어 있습니다. 덴트리(dentry) : 덴트리(dentry)는 파일 이름과 아이노드(inode)를 연결하는 역할을 합니다. 덴트리 역시 저장장치와 메모리 양쪽에 존재하며, 메모리에는 캐싱 목적으로 복사되어 있습니다. struct ext4_inode 내부의 i_block에서 스토리지의 각 block들을 가리킨다. EXT4_N_BLOCKS 크기는 15로 ext4가 지원하는 데이터 블록 주소 지정 방식의 표준 크기이며, 이를 통해 작은 파일부터 아주 큰 파일까지 효율적으로 저장 위치를 관리할 수 있습니...

Xen overview

Reference: CPU scheduling for virtual desktop infrastructure, Hwanju Kim
Task-aware Virtual Machine Scheduling for I/O Performance, Hwanju Kim, VEE'09
Running Xen, Matthews, Prentice hall

Xen Overview

Xen is an open-source hypervisor based on a paravirtualization technique, which achieves higher performance than full virtualization approaches.
(Full virtualizatoin: allows a system to run many instructions directly on the raw ahrdware. It no longer must use software to simulate a different basic architecture.)

Xen puts the priviledged VM, called domain0, in charge of managing other guest VMs, called domainU.

Xen also supports full virtualization based on hardware-assisted virtualization(Intel-VT and AMD-V), ensuring that it is possible to run unmodified OSes such as Windows. such a full-virtualized domain is called a hardware virtual machine (HVM) by Xen.



The Xen Hypervisor

The Xen hypervisor is the heart of Xen. It sits between the guest domains and the physical hardware.
- allocate and control resources
- enforce protection and isolation
In this chapter, I describe the Xen hypervisor and how it interacts with guest domains.

Xen Hypervisor

The following list summarizes the role of the hypervisor:
1. The hypervisor gives each guest domain a portion of the full physical machine resources.

2.The hypervisor exports simplified devices to guest domains.

3. The hypervisor can modify portions of the physical architecture that are difficult to fully virtualize.

댓글

이 블로그의 인기 게시물

[FPGA] Rocket Chip Generator

리눅스 커널 파일 시스템 [2] 코드 분석 - generic_file_read_iter()