Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Chapter 4 Questions provide the seven different types of file of a UNIX system.

ID: 3712106 • Letter: C

Question

Chapter 4 Questions provide the seven different types of file of a UNIX system. What is the interpretation of the file access permission 0624 (specified in octal)? 2.Assume that you have the UNIX directory tree in page 271, and that a user has /usr/ast as its working directory What is the absolute path name of the file: dict.? what is the relative path name of the file: dict.? Circle two of the following copy commands that do not do the same thing. (NB: if they all do the same thing, do not circle anything) cp /usr/lib/dictionary p /usr/lib/ cp /usr/lib/dictionary /usr/ast/dictionary dictionary dictionary Provide a description of each of the following: a computer disk layout Master boot record partition table Describe the events that take place when a computer is booted (turned on) a)What are the different ways in which files are implemented? A file A uses disk blocks 6, 2, 8, 5, 3, and 9 in this order Provide the linked list allocation of these blocks provide the linked list allocation of these blocks using a file allocation table. provide the i-node allocation of these blocks. Some digital consumer devices need to store data, for example as files. Name a modern device that requires file storage and for which i contiguous allocation would be a fine idea. Name one advantage of hard links over symbolic links and one advantage of symbolic links over hard links. The beginning of a free space bitmap looks like this after the disk partition is first formatted: 1000 0000 0000 0000 (the first block is used by the root directory). The system always searches for free blocks starting at the lowest numbered block, so after writing file A, which uses 6 blocks, the bitmap looks like this: 1 1110 0000 0000. Show the bitmap after each of the following additional actions: File B is written, using 5 blocks File A is deleted File C is written using 8 blocks File B is deleted

Explanation / Answer

1)a)Answer:

File types in unix:

Regular file

The regular file is a most common file type found on the Linux system. It governs all different files such us text files, images, binary files, shared libraries, etc. You can create a regular file with the touch command:

The first character of the ls command, in this case "-", denotes the identification code for the regular file. To remove a regular file you can use the rm command:

Directory

Directory is second most common file type found in Linux. Directory can be created with the mkdircommand:

$ mkdir FileTypes
$ ls -ld FileTypes/
drwxrwxr-x 2 lubos lubos 4096 Jan 10 13:14 FileTypes/

As explained earlier, directory can be identified by "d" symbol from the ls command output. To remove empty directory use the rmdir command.

When trying to remove directory with the rmdir command, which contains additional files you will get an error message:

In this case you need to use a command:

Character device

Character and block device files allow users and programs to communicate with hardware peripheral devices. For example:

In this case the character device is the vmware module device.

Block Device

Block devices are similar to character devices. They mostly govern hardware as hard drives, memory, etc.

Local domain sockets

Local domain sockets are used for communication between processes. Generally, they are used by services such as X windows, syslog and etc.

Sockets can be created by socket system call and removed by the unlink or rm commands.

Named Pipes

Similarly as Local sockets, named pipes allow communication between two local processes. They can be created by the mknod command and removed with the rm command.

Symbolic Links

With symbolic links an administrator can assign a file or directory multiple identities. Symbolic link can be though of as a pointer to an original file. There are two types of symbolic links:

The difference between hard and soft links is that soft links use file name as reference and hard links use direct reference to the original file. Furthermore, hard links cannot cross file systems and partitions. To create symbolic soft link we can use ln -s command:

To remove symbolic link we can use unlink or rm command.

3)Answer:

Master Boot Record (MBR) :

The master boot record is a category of boot sector and the very first sector found in computer mass storage media such as fixed disks and removable computer drives. The master boot record provides the information on loading the operating system and also on the partition of the hard disk. The programs residing in master boot record help determine which partition needs to be used while booting. The master boot record is absent on non-partitioned devices such as super floppies, floppies or other devices configured in such a manner.

A master boot record has the following features: It is always located in the first sector of the hard disk. Cylinder 0, Head 0, Sector 1 is the specific address of the master boot record on the hard disk. It holds information about the organization of the partitions and the file system. A master boot record is generally 512 bytes or more. With help of the command FDISK or MBR, users can create a master boot record in Dos and Windows systems. The master boot record is capable of functioning as a chain boot loader independent of the operating system. The three main components of the master boot record are the master partition table, master boot code and disk signature. A corrupted master boot record can be repaired in Windows 7 and Windows Vista using the command "bootrec," available in system recovery options. In Windows XP, the command to be used for repairing is "fixmbr." One of the latest alternatives to to the master boot record is the GUID partition table. It’s a component of the unified extensible firmware interface specification.

Partition Table:

A partition table is a 64-byte data structure that provides basic information for a computer's operating system about the division of the hard disk drive (HDD) into primary partitions.

A data structure is an efficient way of organizing data. A partition is a division of a HDD into logically independent sections. Primary partitions are the first four partitions on a HDD.

The partition table is part of the master boot record (MBR), which is a small program that is executed when a computer boots (i.e., starts up) in order to find the operating system and load it into memory. The MBR also contains other information needed by the BIOS (basic input output system) in order to access the HDD (on which the operating system is usually located).

4)Answer:

Booting is a process or set of operations that loads and hence starts the operating system, starting from the point when user switches on the power button.

urn on the Power button.

·         CPU pins are reset and registers are set to specific value.

·         CPU jump to address of BIOS (0xFFFF0).

·         BIOS run POST (Power-On Self Test) and other necessary checks.

·         BIOS jumps to MBR(Master Boot Record).

·         Primary Bootloader runs from MBR and jumps to Secondary Bootloader.

·         Secondary Bootloaders loads Operating System.

These are the tasks that are carried during booting process. Now let us discuss them in detail.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote