vault backup: 2022-11-04 12:01:13

This commit is contained in:
Jet Hughes 2022-11-04 12:01:13 +13:00
parent 9cb1b64d65
commit 219d6a2f98
3 changed files with 25 additions and 3 deletions

View File

@ -60,7 +60,7 @@ these issues have been solved using block allocaiton instead of continuous alloc
## system calls for file systems
- open close, read, write, ioctl, etc
`ssize_t write(int fd, const, void *buf, size_t count)`
`ssize_t write(int fd, const void *buf, size_t count)`
- fd - file descriptor
- write up to count butes from the buffer pointed buf to the file referred to by the file descriptor
- returns -1 if error. and errno is set
@ -82,7 +82,6 @@ these issues have been solved using block allocaiton instead of continuous alloc
you can give *advice* to the OS about how to read the file by specifying sequential or direct
# directory structure
tree structured

View File

@ -0,0 +1,9 @@
---
title: "204-questions"
aliases:
tags:
---
1. in read and write system calls why is the buffer const in write and not in read
2.

View File

@ -7,6 +7,20 @@ tags:
A file is a collection of related data. They can be thought of as artifacts of the dialogue between the user and the OS
# Attributes
The attributes of a file are stored in an index node (inode) which held in a directory. These attributes include: name, owner, type, location, size, permissions, more.
There are two main systems calls for file interaction: write and read
# System Calls
There are two main systems calls for file interaction: write and read.
# File Access patterns
There are two main types of access: **Sequential** and **Direct** access.
In sequential access, a file pointer specifies a record within the file. The pointer can then be moved forward (read or write) or backwards (rewind).
In direct access, a file is viewed as a numbered sequence of records. Operations can be done on any record in any order.
# Directory structure
# Disk allocation methods