*Rani of Hearts-Reena Kapoor Paristan#55*The Cave Woman - Page 2

Created

Last reply

Replies

1.1k

Views

43.3k

Users

5

Likes

80

Frequent Posters

MasoomaBukhari thumbnail
Anniversary 16 Thumbnail Group Promotion 8 Thumbnail + 4
Posted: 5 years ago
#11

a single call to the write() system call, to the file descriptor 1. As we mentioned above, this descriptor is known as the standard output, and thus is used to write the word “hello” to the screen

MasoomaBukhari thumbnail
Anniversary 16 Thumbnail Group Promotion 8 Thumbnail + 4
Posted: 5 years ago
#12

fork()

if you create a number of processes that are cooperatively working on a task, they can write to the same output file without any extra coordination


dup()

allows a process to create a new file descriptor that refers to the same underlying open file as an existing descriptor.

MasoomaBukhari thumbnail
Anniversary 16 Thumbnail Group Promotion 8 Thumbnail + 4
Posted: 5 years ago
#13

FFS:

directory and files are stored in one group next to each other.. data is accddee bcz each file has 2 data blocks

group inodes data

0 /--------- /---------

1 acde------ accddee---

2 bf-------- bff-------

3 ---------- ----------

4 ---------- ----------

5 ---------- ----------

6 ---------- ----------

7 ---------- ----------

...

MasoomaBukhari thumbnail
Anniversary 16 Thumbnail Group Promotion 8 Thumbnail + 4
Posted: 5 years ago
#14

inode allocation policy:

data is dispersed into groups and accessing file of an inode gets difficult again comparing to FFS.. so purpose of grouuping is killed

group inodes data

0 /--------- /---------

1 a--------- a---------

2 b--------- b---------

3 c--------- cc--------

4 d--------- dd--------

5 e--------- ee--------

6 f--------- ff--------

7 ---------- ----------

...

MasoomaBukhari thumbnail
Anniversary 16 Thumbnail Group Promotion 8 Thumbnail + 4
Posted: 5 years ago
#15

large file exception:

large file can fill up whole block and rest of the files might not get space in the block

group inodes data

0 /a-------- /aaaaaaaaa aaaaaaaaaa aaaaaaaaaa a---------

1 ---------- ---------- ---------- ---------- ----------

2 ---------- ---------- ---------- ---------- ----------

...


so divide the large file into groups

group inodes data

0 /a-------- /aaaaa---- ---------- ---------- ----------

1 ---------- aaaaa----- ---------- ---------- ----------

2 ---------- aaaaa----- ---------- ---------- ----------

3 ---------- aaaaa----- ---------- ---------- ----------

4 ---------- aaaaa----- ---------- ---------- ----------

5 ---------- aaaaa----- ---------- ---------- ----------

6 ---------- ---------- ---------- ---------- ----------

...

MasoomaBukhari thumbnail
Anniversary 16 Thumbnail Group Promotion 8 Thumbnail + 4
Posted: 5 years ago
#16

Seek time is the time taken for a hard disk controller to locate a specific piece of stored data. Other delays include transfer time (data rate) and rotational delay (latency)

MasoomaBukhari thumbnail
Anniversary 16 Thumbnail Group Promotion 8 Thumbnail + 4
Posted: 5 years ago
#17

bitmap:

simple structure: each bit is used to indicate whether the corresponding object/block is free (0) or in-use (1).

MasoomaBukhari thumbnail
Anniversary 16 Thumbnail Group Promotion 8 Thumbnail + 4
Posted: 5 years ago
#18

SOLUTION TO CONSISTENCY ISSUES

1) File checker

summary of what fsck does:

Superblock: sanity checks - goal of sanity checks is to find a suspect (corrupt) superblock;

Free blocks: scans the inodes, indirect blocks, double indirect blocks, etc., to build an understanding of which blocks are currently allocated -> to produce a correct version of the allocation bitmaps; thus, if there is any inconsistency between bitmaps and inodes, it is resolved

Inode state: makes sure that each allocated inode has a valid type field -> cleared by fsck if any problem ; updated

Edited by MasoomaBukhari - 5 years ago
MasoomaBukhari thumbnail
Anniversary 16 Thumbnail Group Promotion 8 Thumbnail + 4
Posted: 5 years ago
#19

SOLUTION TO CONSISTENCY ISSUES

2) journaling

writing what to do before doing it

thus, you will know exactly what to fix (and how to fix it) after a crash, instead of having to scan the entire disk

after journaling, old structure is overwritten in system -> checkpointing

MasoomaBukhari thumbnail
Anniversary 16 Thumbnail Group Promotion 8 Thumbnail + 4
Posted: 5 years ago
#20

Originally posted by: MasoomaBukhari

SOLUTION TO CONSISTENCY ISSUES

2) journaling

writing what to do before doing it

thus, you will know exactly what to fix (and how to fix it) after a crash, instead of having to scan the entire disk

after journaling, old structure is overwritten in system -> checkpointing


what if power cut happens while writing journal?

To avoid this problem, the file system issues the transactional write in two steps. First, it writes all blocks except the TxE block to the journal, issuing these writes all at once.

When those writes complete, the file systemissues the write of the TxE block


Top