File System Implementation
Allocation Methods
โ Continuous allocation
โ Discontinuous allocation
- Linked allocation
- Indexed allocation
Continuous Allocation
โ ํ File์ ๋์คํฌ์ ์ฐ์๋ block์ ์ ์ฅ
โ ์ฅ์
- ํจ์จ์ ์ธ file ์ ๊ทผ (์์ฐจ, ์ง์ ์ ๊ทผ)
โ ๋ฌธ์ ์
- ์๋ก์ด file์ ์ํ ๊ณต๊ฐ ํ๋ณด ์ด๋ ค์
- External fragmentation
- File ๊ณต๊ฐ ํฌ๊ธฐ ๊ฒฐ์ ์ด ์ด๋ ค์
- ํ์ผ์ด ์ปค์ ธ์ผ ํ๋ ๊ฒฝ์ฐ ๊ณ ๋ ค ํ์
Linked Allocation (Discontinuous alloc.)
โ File์ด ์ ์ฅ๋ Block๋ค์ Linked List๋ก ์ฐ๊ฒฐ
- ๋น์ฐ์ ํ ๋น ๊ฐ๋ฅ
โ Directory๋ ๊ฐ file์ ๋ํ ์ฒซ ๋ฒ์งธ block์ ๋ํ ํฌ์ธํฐ๋ฅผ ๊ฐ์ง๋ค
โ ์ฅ์
- Simple, No external fragmentation
โ ๋จ์
- ์ง์ ์ ๊ทผ์ ๋นํจ์จ์
- ํฌ์ธํฐ ์ ์ฅ์ ์ํ ๊ณต๊ฐ ํ์
- ์ ๋ขฐ์ฑ ๋ฌธ์ (์ฌ์ฉ์๊ฐ ํฌ์ธํฐ ์ค์๋ก ์์ )
Linked Allocation : variation -> FAT
โ File Allocation Table (FAT)
- ๊ฐ block์ ์์ ๋ถ๋ถ์ ๋ค์ ๋ธ๋ก์ ๋ฒํธ ๊ธฐ๋ก
- direct access ๋ฑ ํ์ ์ ์ด์
โ MS-DOS, Windows ๋ฑ์ ์ฌ์ฉ
Indexed Allocation
โ File์ด ์ ์ฅ๋ block์ ์ ๋ณด(pointer)๋ฅผ Index block์ ๋ชจ์ ๋
โ ์ง์ ์ ๊ทผ์ ํจ์จ์
- ์์ฐจ ์ ๊ทผ์๋ ๋นํจ์จ์
โ Filed ๋น Index block์ ์ ์ง
- Space overhead
- Index block ํฌ๊ธฐ์ ๋ฐ๋ผ ํ์ผ์ ์ต๋ ํฌ๊ธฐ ์ ํ
โ Unix ๋ฑ์ ์ฌ์ฉ
Free Space Management
- Bit Vector
- Linked List
- Grouping
- Counting
Bit vector
โ ์์คํ ๋ด ๋ชจ๋ block๋ค์ ๋ํ ์ฌ์ฉ ์ฌ๋ถ๋ฅผ 1 bit flag๋ก ํ์
โ Simple and Efficient
โ Bit vector ์ ์ฒด๋ฅผ ๋ฉ๋ชจ๋ฆฌ์ ๋ณด๊ดํด์ผ ํจ
- ๋ํ ์์คํ ์ ๋ถ์ ํฉ
Linked List
โ ๋น Block์ Linked List๋ก ์ฐ๊ฒฐ
โ ๋นํจ์จ์
Grouping
โ N๊ฐ์ ๋น block์ ๊ทธ๋ฃน์ผ๋ก ๋ฌถ๊ณ , ๊ทธ๋ฃน ๋จ์๋ก linked list๋ก ์ฐ๊ฒฐ
โ ์ฐ์๋ ๋น block์ ์ฝ๊ฒ ์ฐพ์ ์ ์๋ค
Counting
โ ์ฐ์๋ ๋น block๋ค ์ค ์ฒซ ๋ฒ์งธ block์ ์ฃผ์์ ์ฐ์๋ block์ ์๋ฅผ table๋ก ์ ์ง
โ Continuous allocation ์์คํ ์ ์ ๋ฆฌ
'โญ Group_Study > Operating System' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[10์ฃผ์ฐจ] Disk Scheduling (0) | 2023.02.02 |
---|---|
[10์ฃผ์ฐจ] I/O System (0) | 2023.02.01 |
[9์ฃผ์ฐจ] File Protection (0) | 2023.01.29 |
[9์ฃผ์ฐจ] Directory Structure (0) | 2023.01.28 |
[9์ฃผ์ฐจ] File System Overview (0) | 2023.01.27 |
๋๊ธ