Documente Academic
Documente Profesional
Documente Cultură
Time, date, and user identificationdata for protection, security, and usage monitoring
[1b]
A Single Level Directory is the simplest directory structure, simplest form of logical
organization: one global or root directory containing all the files.
Advantage:
all files are contained in the same directory, which is easy to support and
understand
Disadvantages:
when the number of files increases or when there is more than one user, all files
must have unique names since all files are in the same directory
Tree Structured Directories are like branches in a tree and files are like leafs. The tree
has a root, which is a directory. Which in turn has a list of files. A file is either a
regular file, or a subdirectory. A subdirectory can have either files or other
subdirectories. All directories and files have names, Separator, Pathname, and Search Paths.
A user can access a file by specifying the files absolutepath name or relative path name.
begins at the root and follows a path down to the specified file, giving the
directory names on the path
Advantage:
Efficient Searching
with a tree-structured directory system, users can access, in addition to their files,
the files of other users.
Grouping Capability
Disadvantages:
Approach 2:Provide the option to delete all the files and subdirectories(UNIX rm
command with r option)
[1c] A cycle graph is a graph that consists of a single cycle, or in other words, some
number of vertices(directories)connected in a closed chain containing a single cycle
through all nodes.
To prevent cycles from being created we can perform the following steps:
Allow only links to file not subdirectories.
Every time a new link is added use a cycle detection algorithm to
determine whether it is ok.
[1d]
In file protection the File owner/creator should be able to control:-
What can be done- What type of access is permitted: There are five possible
actions that can be performed on a file:read,write,execute,delete,and some combination of
thefour.
By whom
[2]
In Linked Allocation each file is a linked list of disk blocks.
Blocks may be scattered anywhere on the disk.
Each node in list can be a fixed size physical block or a contiguous collection
of blocks.Allocate as needed and then link together via pointers.
Disk space used to store pointers, if disk block is 512 bytes, and pointer (disk
address) requires 4 bytes, user sees 508 bytes of data.
Pointers in list not accessible to user.
While in Indexed Allocation it brings all pointers together into the index block
Need index table.
Supports sequential, direct and indexed access.
Dynamic access without external fragmentation, but have overhead of index block.
Mapping from logical to physical in a file of maximum size of 256K words and
block size of 512 words. We need only 1 block for index table.
Mapping - <Q,R>
Q - displacement into index table
R - displacement into block
Mapping from logical to physical in a file of unbounded length.
Linked scheme Link blocks of index tables (no limit on size)
Multilevel Index
E.g. Two Level Index - first level index block points to a set of second
level index blocks, which in turn point to file blocks.
Increase number of levels based on maximum file size desired.
Maximum size of file is bounded.
[2B]
When you switch the PC on, control is passed to a small program on the motherboard called the
BIOS, The Basic Input/OutputSystem is the lowest level interface between the computer and
peripherals and it performs integrity checks on memory and seeks instructions on the Master
Boot Record (MBR) on the floppy drive or hard drive.
When a boot device is found, the first-stage boot loader is loaded into RAM and
executed.This boot loader is less than 512 bytes in length (a single sector), and its job is
to load the second-stage boot loader.
The stage 1 boot loader is the Master Boot Record (MBR)which points to the boot loader
(GRUB or LILO: Linux boot loader).
When the second-stage boot loader is in RAM and executing, a splash screen is commonly
displayed.This second stage boot loader usually GRUB or LILO will then ask for the OS label
which will identify which kernel to run and where it is located (hard drive and partition
specified).
The installation process requires the creation/identification of partitions and where to install the
OS. GRUB/LILO are also configured during this process.
When the images are loaded, the second-stage boot loader passes control to the kernel
image and the kernel is decompressed and initialized.
At this stage, the second-stage boot loader checks the system hardware, enumerates the attached
hardware devices, mounts the root device, and then loads the necessary kernel modules.
The first thing the kernel does is to execute init program.
Based on the appropriate run-level, scripts are executed to start various processes to run
the system and make it functional.
[2C]
The Linux Init Processes process is the last step in the boot procedure and identified by process
id "1". The Init Processes is responsible for starting system processes as defined in the
/etc/inittabfile. The Init typically will start multiple instances of "getty" which waits for console
logins which spawn one's user shell process.
Upon shutdown, init controls the sequence and processes for shutdown.
A point to note is that the init process is never shut down.
The Init is a user process and not a kernel system process although it does run as root.
[2D]
There are numerous needs for logs/ logging data, some are:
Determine if there are errors in a system or application
Debugging purposes
Keeping a history of what was done
Audit trail for security purposes and accountability
And to ensure what the application set out to do are completed and if not, determine
why?
To capture output from applications so that they can be analyzed immediately or at a
later date.
[2E]
There is a need for log rotation because log files can get rather large and cumbersome over
time.When A log file grows without bound, unless an action is taken this can cause problems.
Problems with growing log files are:
When executed, logrotate will take the current version of the log files and add a ".1" to
the end of the filename.
Then any other previously rotated files are sequenced with ".2," ".3," etc. The larger the
number after a filename, the older the log is.
You can configure the automatic behavior for logrotateby editing the
/etc/logrotate.conffile.