
일반적으로 파일은 비휘발성의 보조기억장치에 저장한다.
파일 연산 : create, read, write, reposition (lseek), delete, open, close
- open, close
open-read/write-close
open: 파일의 metadata를 메모리에 올려놓는 것 (disk-> memory)
- metadata = file attribute
파일 자체의 내용이 아니라 파일 관리를 위한 각종 정보들.
파일 이름, 유형, 저장위치, 파일 사이즈, 접근 권한, 시간, 소유자 등
File system : 파일을 어떻게 저장할 지, 관리할 지, 파일의 보호

- Directory
디렉토리도 파일의 일종, 하위 파일들의 메타데이터(일부)를 가지고 있는 특별한 파일.
연산 : search, create, delete, rename a file, list a dir, traverse the file system(파일시스템 전체 탐색
- 논리적 저장공간 (VS 물리적 저장공간 ), 논리적 Disk == Partition
물리디스크 하나에 여러 파티션 쓰거나,
여러 물리디스크를 묶어서 하나의 파티션으로 쓰기도 함.
디스크의 용도 : 크게 2가지 open file system | swap area

open: 파일의 metadata를 메모리에 올려놓는 것 (시스템콜)
이미 한 번 읽어둔 것은 버퍼캐시에 올라와있기 때문에 굳이 루트 dir 부터 찾을 필요없이 바로 버퍼캐시에 접근해서 쓸 수 있음/

메모리에 올라간 메타데이터는 + 프로세스별로 필요한 오프셋에 관련된 정보를 함께 가지고 있음.

((메모리 프로텍션은 접근할 수 있냐 아니냐만 있었음))
파일에 대한 접근은 3가지로 나뉨 (read write execution)
- 테이블 - Acess control Matrix
- Grouping - 전체 유저를 owner, group, public 세 그룹으로 구분하고,
각 파일에 대해 세 그룹의 접근 권한 3가지(rwx)를 3비트로 표시 (!!!, 일반적)
- Password - 접근 권한 별로 password를 둔다? 관리하기 너무 어려워

만약 다른 파티션에 있는 dir 접근해야하면?
=> Mounting : 서로 다른 파티션의 FS를 연결

- 파일 정보 접근 방식 2가지 : 순차접근과 직접접근