본문 바로가기

Study/운영체제

(14)
Chapter#25 Log-structured File Systems 대망의 마지막 챕터 Chapter#25 Log-structured File Systems Log-structured File System Journaling은 TxB, TxE도 쓰고 double write하여 오버헤드 있음 > Log-structured File System(LFS) 사용 e.g. F2FS, NetApp's WAFL, Btrfs, ZFS, ... 장점 : no consistent update problem no double writes write performance가 좋다 - disk는 sequential I/O operation에 optimized되어있음 Data block을 쓰고 순차적으로 metadata block도 쓴다. Single data block을 하나씩 쓰면 latenc..
Chapter#24 FSCK and Journaling Chapter#24 FSCK and Journaling - Crash Consistency Problem - File System Checker(fsck) - Journaling Crash Consistency Problem Crash Consistency file system data structure은 파워가 꺼져도 persist해야함 crash-consistency problem 발생 및 해결책 - fsck (file system checker) - Journaling (wrire-ahead logging) Crash Consistency Problem open() > lseek() > write() > close() 작업을 한 경우 기존 file 크기는 1 첫 direct pointer가 4(Da..
Chapter# 23 Fast File System Chapter#23 Fast File System Fast File System Old Unix File System 장점 : 간단하며 기본적인 file/directory abstraction 지원 file system 구현이 쉽다 단점 : 1) high positioning costs data가 넒게 퍼져있어서 찾는데 왔다갔다 해야됨 2) Fragmentation makes it worse FFS(Fast File System) : Disk Awareness is the solution. (UC.Berkeley에서 만듦) Cylinder Group(or block group) : 비슷한 위치에 있는 트랙들을 묶은 것 - seek time을 줄일 수 있다 File/Directory 할당 방법 : poli..
Chapter#22 File System Implementation Chapter#22 File System Implementation File System Implementation Data structure : data/metadata 표시를 위한 on-disk structure Access methods : open(), read(), write() Divide disk into blocks Block size : 4KB (sector 512B) data region : user data를 저장하기 위한 공간을 잡아둠 inode table : on-disk inodes array - inode table : 3~7, inode size : 256 bytes - 4KB block can hold 16 inodes - filesystem contains 10 inode..
Chapter#21 IO : File and Directory Chapter#21 IO : File and Directory - Files and Directories - Unix file IO - Links - Mount Files and Directories Storage Virtualization File : read/write가능한 linear array of bytes - content : creator에 의해 만들어짐 e.g. text/binary - inode number로 identified됨 (pid와 유사) Directory : file과 directories를 묶기 위한 special file - content : list of (user-readable name, inode #) pairs를 가짐 - hierarchical oraganizati..
Chapter#20 Flash-based SSDs Chapter#20 Flash-based SSDs - Flash-based SSD - Direct Mapped FTL - Log-structured FTL - Wear-leveling Flahs-based SSD Solid-state Storage Drives (SSDs) - much shorter I/O latency (e.g. 10ms vs 50us) - much higher I/O throughput (e.g. 100MB/s vs 5GB/s) - DRAM과 다르게 power가 꺼져도 data 유지 - key technology : NAND flash memory NAND Flash - HDD는 transistor based이지만 - SSD는 NAND Flahs memory based이다 > non-..
Chapter#19 I/O : HDD and RAID Chapter#19 I/O : HDD and RAID - Hard Distk Drives - Disk Scheduling - RAID 시스템 프로그래밍 수업 내용이랑 겹치는 부분 Hard Disk Drivers (HDDs) Disk Geometry 각 Platter : 2 surface 각 Surface : Ring 형태의 tracks 각 track : gaps로 나눠진 sectors Disk Operation disk surface : fixed rotation rate로 회전 read/write head : arm 끝에 달려서 disk surface를 얇은 air cushion을 두고 읽음. arm에 의해 track이동 Disk Access surface는 CCW로 돎 헤더가 위에 있을 때 해당 se..
Chapter#18 I/O Device Chapter#18 I/O Devices I/O Devices I/O System Architecture memory bus를 통해서 main memory가 cpu에 붙는다 I/O bus를 통해서 system에 연결된다 Memory Bus : 100~300 GB/s General I/O Bus : PCIe3.0 36GB/s ~ PCIe5.0 100GB/s Peripheral I/O Bus : 5GB/s hierarchical structrue 사용 이유 : 물리/비용적 issue bus가 빠를수록 high performance를 유지하는건 비용이 크며 더 적은 device를 넣을 수 있다 Canonical Device H/W interface : system software가 작동을 제어할 수 있도록 함..