Multiple choice technology operating systems

How will the kernal differentiate the ordinary files and device files?

  1. using the temp filed in the file's inode

  2. using the id filed in the file's inode

  3. using the type filed in the file's inode

  4. using the type filed in the directory's inode

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The kernel uses the 'type' field in the file's inode to distinguish between ordinary files and device files. Each inode contains a type field that identifies whether the file is a regular file, directory, character device, block device, symbolic link, etc. Option A (temp field) and B (id field) don't exist for this purpose. Option D is wrong because the type is in the file's inode, not the directory's.