Interblocage Flashcards
Conditions for deadlock
Mutual Exclusion
Hold and Wait
No preemption
Circular wait
Mutual Exclusion
At least one resource must be held in a non-sharable mode.
If a process is holding a resource, others must wait.
Hold and Wait
A process is holding at least one resource and waiting to acquire more resources that are currently held by other processes.
No Preemption
Resources cannot be forcibly taken away from a process — they must be released voluntarily.
Circular Wait
There exists a circular chain of processes, each waiting for a resource held by the next process in the chain.
Where is page table stored?
RAM
cache line
the smallest unit of memory transferred into the cache (usually 64 bytes)
temporal locality
recently used data is likely to be used again
spacial locality
nearby data is likely to be accessed soon
eviction
if the cache is full, it removes the least recently used (LRU) data to make room
TBL
Translation Lookaside Buffer (cache)
PTBR
Page Table Base Register
virtual address contains…
page number, offset
Each entry in the segment table contains…
- Base address (where the segment starts)
- Limit (how long it is)
- Access rights, etc.
les étapes pour lire un fichier avec l’instruction read(index)
- Trouver la bonne entrée dans la table des fichiers ouverts par processus
- Trouver la bonne entrée dans la table des fichiers ouverts du système
- Charger le bloc de contrôle de fichier (FCB)
- Lire les blocs de données
le bloc de contrôle de fichier (FCB) dans un système de fichiers sert a…
contenir les informations de métadonnées du fichier
file metadata
- File size
- Owner (UID), group (GID)
- Permissions (rwx bits)
- Timestamps (created, modified, accessed)
- Number of links (how many dir entries point to it)
- Pointers to data blocks on disk
Dans une allocation contiguë de fichiers, le principal inconvénient est…
Elle nécessite de connaître la taille du fichier à l’avance
FAT file system entries store:
- next block number
- EOF (or equivalent)
FAT file system directory entries store:
- filename
- starting block
- file size
- attributes
Cons of FAT32:
Fragmentation (contiguous allocation)
Slow random access (linked list)
Scalability (limits file size)
ext2 directories store:
mappings of file names to inode numbers
inodes store:
- metadata
- pointers to data blocks
Purpose of dirty bit
Indicates whether the page has been modified (written to) since it was loaded into RAM