CS/운영체제
[운영체제-김덕수교수님] 파일 시스템 (2/5)
Damagucci-juice
2022. 8. 17. 17:30
- 파티션
- 디렉터리
- 파일
File system
- 사용자들이 사용하는 파일들을 관리하는 운영체제의 한 부분
- File system의 구성
- Files
- 연관된 정보의 집합
- Directory structure
- 시스템 내 파일들의 정보를 구성 및 제공
- Partitions
- Directory들의 집합을 논리적 / 물리적으로 구분
- Files
File Concept
- 보조 기억 장치에 저장된 연관된 정보들의 집합
- 보조 기억 장치 할당의 최소 단위
- Sequence of bytes(물리적 정의)
- 내용에 따른 분류
- Program file
- Source program, object program, executable files
- Data file
- Program file
- 형태에 따른 분류
- Text(ascii) file
- Binary file
File Attributes(속성)
- name
- identifier
- type
- location
- size
- protection
- access control information
- User identification(owner)
- Time, date
- creation, late reference, last modification
File operations
- Create
- Write
- Read
- Reposition
- Delete
- Etc,
- OS는 file operation 들에 대한 system call 을 제공해야 함
File Access Methods
- Sequential access(순차 접근)
- File을 record(or bytes) 단위로 순서대로 접근
- E.g, fgetc()
- File을 record(or bytes) 단위로 순서대로 접근
- Directed access(직접 접근)
- 원하는 Block을 직접 접근
- E.g., lseek(), seek()
- 원하는 Block을 직접 접근
- Indexed access
- Index를 참조하여, 원하는 block을 찾은 후 데이터에 접근
File System Organization
- Partitions (minidisks, volumes)
- virtual disk
- Directory
- File 들을 분류, 보관하기 위한 개념
- Operations on directory
- Search for a file
- create a file
- delete a file
- list a directory
- rename a file
- traverse the file system
Mounting
- 현재 FS에 다른 FS를 붙이는 것
안드폰 탐색기에서 /mnt 로 SD 카드에 접근
- 기본 FS이 있는데 SD카드가 접근을 했다면 어떻게 접근을 해야 좋을까?
- SD Card의 파일 시스템을 기본 파일 시스템에 붙여야 한다.
- 이를 가능하게 해주는 것이 마운팅이다.
- 리눅스나 유닉스를 사용해보면 경험이 있을 수 있다.