Linux interview Questions - Database


We saw the mention on the Linux BIOS website about one million devices shipped with Linux BIOS. Could you tell us more about these devices?


Yes, these are internet terminals that were built in India, based on the [x86 system-on-chip] STPC chip, I am told; also, there evidently is a Turkish-built digital TV that runs Linux BIOS. I have also heard that there are routers and many other embedded devices running Linux BIOS. I think at this point that 1 million is a low number. I am in contact with other set-top box vendors that are talking about numbers in the 10s of millions for their products. These numbers actually make the OLPC numbers seem small, which is in it amazing.

Which daemon controls the network service -> POP3 mail service?


The intend super daemon controls the POP3 mail service. The POP3 mail service runs through the super daemon, not on its own. Answers c and e point to nonexistent, or at least nonstandard daemons. Answer d points to the Usenet news daemon.

Who owns the data dictionary?


The SYS user owns the data dictionary. The SYS and SYSTEM users are created when the database is created. The SYS user owns the data dictionary. The SYS and SYSTEM users are created when the database is created.
how we can configure sata hard derive during redhat 9 installation.
Have the data driver on a floppy drive. At the start of installation, when u boot from the CD/DVD, on the prompt, write “dd”. It will ask for the driver floppy later on and will load the sata driver. Then you can configure/partition the drive using disk druid or fdisk

What is difference between AT and CRON?


Cron command is used to schedule the task daily at the same time repeatedly ,”at” command is used to schedule the task only once i.e. to run only one time.
What is difference between user right and user permission?


user rights:user rights is that user is authorized to used password. if his password/file/dir is expired he is not able to login
user permission:permission is user is permitted to use file/directory. that is authentication
if he is authentication for particular file or not.
it might be true as per my suggestion.


What is the real mean of DHCP?


Dynamic addressing simplifies network administration because the s/w keeps track of IP addresses rather than requiring an administrator to manage the task. That means new computer can be added to the network without any risk of manually assigning unique IP address.
Describe the boot process of your favorite Linux in as much detail as you can.
Boot process takes place in 4 scenes with 4 main characters.
Scene 1
when the computer
is switched on, it automatically invokes BIOS[a ROM chip embedded in the motherboard].The BIOS will start the processor and perform a POST[power on self test] to check whether the connected device are ready to use and are working properly.
Once the POST is completes BIOS will jump to a specified location in the RAM and check for the booting device. The boot sector is always the first sector of the hard disk and BIOS will load the MBR into the memory.
Scene 2
Here the boot loader takes the control of the booting process.LILO or GRUB is the boot loaders commonly available. It will help the user to select various boot options. Depending on the boot option selected the kernel is loaded.
scene 3
After kernel is loaded the kernel will take the control of the booting process and it will initialize all the hardwares including I/O processors etc.kernel then creates a root device and mounts the partitions.
Scene 4
INIT is loaded.
How to install 8139 realtek drivers in rhel5.0$ Please help me out.
Download the driver from internet.
then just unzip the tarball using tar -zxvf
then for first compile it using make and make install
For proper installation of the driver read the INSTALL / README file given in the tarball.


You are debugging a new application that is crashing. You want to watch the messages as they are being written to the log. What command should you use?


The tail command allows you to keep a log open and see each new message as it is written to the log.


Which of the following tasks cannot be accomplished with the touch command?


The touch command is usually used to modify either a file’s access or modification time. It can also be used to create a new file.


You want to copy the user’s home directories to a new location. Which of the following commands will accomplish this?


The -r option tells the cp command to recurs the directories. The -P option retains the original permissions.


You read an article that lists the following command: dd if=/dev/fd0 bs=512 of=/new What does this accomplish?


The dd command is a special copy command often used for floppy disks and tapes. The if= option specifies the source; the bs= is the block size; and the of= option is the output.


You attempt to delete a file called sales.mem using the rm command but the command fails. What could be the problem?


In order to delete a file, you must have write rights to the directory containing the file.


You want to search for sale and sales. What regular expression should you use?


Use the asterick (*) to match to zero or more characters. The ‘$’ matches to any one character so sale$ would not find sale.


You have a file named ‘kickoff’ and would like to find every line beginning with a number. Which of the following commands will accomplish this?


The command grep ^[0-9] kickoff will cause grep to search the file kickoff for any line beginning with a digit.


You want to know how many lines in the kickoff file contains ‘prize’. Which of the following commands will produce the desired results?


Using the -c option with the grep command will show the total number of lines containing the specified pattern rather than displaying the lines containing the pattern.


You want to verify which lines in the file kickoff contain ‘Bob’. Which of the following commands will accomplish this?


The -n option when used with sed prints only the lines containing the pattern. In this case, the pattern is ‘Bob’ and the file to be searched is kickoff.


You have a file called docs.Z but do not know what it is. What is the easiest way to look at the contents of the file?


The .Z extension indicates that this is a file that has been compressed using the compress utility. The zcat utility provides the ability to display the contents of a compressed file.


You want to make it possible for your users to mount floppy disks. What do you need to do?


If you add the user option to the line in the fstab file that defines how to mount your CD-ROM, then your users will be able to mount it.
What is contained in the directory
The /proc directory is a virtual file system that contains system information.


After copying a file to a floppy disk, what should you do before removing the disk?


If you do not unmount the floppy before removing it, the files on the floppy may become corrupted.


You have set quotas for all your users but half of your users are using more space than they have been allotted. Which of the following could be the problem?


Quotas are set on a partition by partition basis. If your users have home directories on different partitions, you will need to configure quotas for each partition.


What command should you use to check the number of files and disk space used and each user’s defined quotas?


The repquota command is used to get a report on the status of the quotas you have set including the amount of allocated space and amount of used space.


you have a large spreadsheet located in the /data directory that five different people need to be able to change. How can you enable each user to edit the spreadsheet from their individual home directories?


By creating a link to the file in each user’s home directory, each user is able to easily open and edit the spreadsheet. Also, any changes that are made are seen by all the users with access.


You have a file called sales data and create symbolic links to it in bob’s home directory. Bob calls you and says that his link no longer works. How can you fix the link?


Because the link in bob’s directory is a symbolic link, if the file sales data in the /data directory is deleted, the symbolic link will no longer work.


You have two files in two different directories with the same inode. What type of link is involved?


Hard links all have the same inode number, unlike symbolic links.


You need to locate a file called sales data that one of your user’s created in his home directory but you do not know which one. How could you use the find command to locate this file?


When using the find command to locate a file by name you must specify the starting place in the directory
hierarchy and the -name option to specify the file to search for.


However, when Bob attempts to open the file he is unsuccessful. What command do you need to use to give Bob ownership of the file?


The chown command can be used by root to give ownership of a file to any user.


What is meant by sticky bit?


When the sticky bit is set on a world writable directory, only the owner can delete any file contained in that directory.


Your default umask is 002. What does this mean?


The digits of your umask represent owner, group and others in that order. The 0 gives read and write for files and the 2 gives read only for files.


Which of the following commands will replace all occurrences of the word rate with the word speed in the file racing?


When using sed to do a search and replace, its default action is to only replace the first occurrence in each line. Adding the ‘g’ makes sed replace all occurrences of the search term even when it occurs multiple times on the same line.


You have a tab delimited file called phonenos and want to change each tab to four spaces. What command can you use to accomplish this?


By default, expand converts tabs to eight spaces. Use the -t option to change this behavior.


You issue the command head *. What would the resulting output be?


If the number of lines to display is not specified, the first ten lines of the specified file are displayed. The asterick tells head to display the content of each file in the present working directory.


what text filter can you use to display a binary file in octal numbers?


The od text filter will dumpt the contents of a file and display it in 2-byte octal numbers.


What would be the result of the command paste -s dog cat ?


The paste text filter usually joins two files separating the corresponding lines with a tab. The -s option, however, will cause paste to display the first file, dog, then a new line character, and then the file cat.


You wish to print the file vacations with 60 lines to a page. Which of the following commands will accomplish this?


The default page length when using pr is 66 lines. The -l option is used to specify a different length.


What would be the result of issuing the command cat phonenos?


The tac text filter is a reverse cat. It displays a file starting with the last line and ending with the first line.


You need to see the last fifteen lines of the files dog, cat and horse. What command should you use?


The tail utility displays the end of a file. The -15 tells tail to display the last fifteen lines of each specified file.


You have the file phonenos that contains telephone numbers and names separated by a comma. You want to change each comma to a semicolon. Which of the following will accomplish this?


The tr utility is used to replace one string by another. Here the input for tr is provided by the cat command and the commas are all replaced by semicolons.


If you type the command cat dog > cat what would you see on your display?


When you use > for redirection, it only effects the standard output. Any messages sent to standard error would still appear on your display.


Which first-level segment of the file system contains a majority of system and server configuration files within its subdirectories?


The /etc portion of the file system contains a number of system and daemon configuration files. Answers a, c, d, and e are valid first-level directories, but are incorrect. The /var directory contains items that change on a regular basis, such as log files and print and mail spool directories. The /bin directory contains system binaries, whereas the /sbin directory contains binaries that run with SUID privileges or as a specific user. The /lib directory contains system libraries, both shared and non-shared.


What command allows you to set a processor-intensive job to use less 
CPU time?


The nice command is used to change a job’s priority level, so that it runs slower or faster. Answers a, d, and e are valid commands but are not used to change process information. Answer c is an invalid command.


Which of the following commands can be used to get information about a package?


The man command pulls up man pages, the info command pulls up texinfo pages which have replaced the man pages for some packages, and the apropos command helps you to find related commands. Answers b and e are not methods of getting information about a package
Where is a good place to store shell scripts that are for use by the author
It is best to keep scripts meant only for your account under ~/bin. Answers b, c, d, and e are all valid locations, but not the best places to keep user-specific scripts.
Which hardware considerations should you keep in mind when putting together this mail server’s list of components$ [Choose all correct answers]
A mail server benefits from a large amount of RAM, a fast CPU, and large amounts of fast-access hard drive space. The reason it benefits from having a lot of memory is that it can then handle groups of mail messages all at once. A fast CPU helps it move through processes more quickly, especially when it comes to generating postings to large mailing lists. Having a lot of hard drive space ensures that the mail spool will not run out of free room. Answers a and c are unimportant on a machine that is meant to provide mail service. A Linux box serving such a purpose would only be slowed down with a GUI running, and the GUI is the reason to be concerned with both the monitor resolution and video RAM.


Of the following technologies, which is considered a client-side script?


JavaScript is the only client-side script listed. Java and C++ are complete programming languages. Active Server Pages are parsed on the server with the results being sent to the client in HTML.


What type of server is used to remotely assign IP addresses to machines during the installation process?


You can use a DHCP server to assign IP addresses to individual machines during the installation process. Answers a, b, d, and e list legitimate Linux servers, but these servers do not provide IP addresses. The SMB, or Samba, tool is used for file and print sharing across multi-OS networks
. An NFS server is for file sharing across Linux net-works. FTP is a file storage server that allows people to browse and retrieve information by logging in to it, and HTTP is for the Web


What type of local file server can you use to provide the distribution installation materials to the new machine during a network installation?


You can use an NFS server to provide the distribution installation materials to the machine on which you are performing the installation. Answers a, b, c, and d are all valid items but none of them are file servers. Inetd is the superdaemon which controls all intermittently used network services. The FSSTND is the Linux File System Standard. DNS provides domain name resolution, and NNTP is the transfer protocol for usenet news.


Which password package should you install to ensure that the central password file couldn’t be stolen easily?


The shadow password package moves the central password file to a more secure location. Answers a, b, and e all point to valid packages, but none of these places the password file in a more secure location. Answer d points to an invalid package.


Which command works in almost all distributions to create a boot disk ?


The mkbootdisk command creates a boot disk. Answers b and c are incorrect. The make package is used to compile software
, not create boot disks. Answers a and d point to invalid commands.


What happens to your ipchains settings when you reboot a machine?


They cannot be automatically saved unless you do something like make an alias for the shutdown routine that ensures this happens. Settings for ipchains are lost during a reboot or shutdown and there is no “setting” to ensure they are automatically saved. Answers a, b, and c are completely incorrect. Answer e is incorrect, but you can save them by hand if you choose to.


Which package provides secure remote login sessions, such as secure telnet logins?


The ssh package allows you to configure secure telnet sessions and other remote logins. Answer a points to an invalid package. Answer c points to a valid package, but shadow handles passwords, not data encryption. Answers d and e point to firewalling packages, which regulate what passes in and out of a LAN, but do not handle data encryption.


Which package can you use to regulate which network traffic is allowed to enter a specific machine, but not on any other machines?


The tcp_wrappers package is used to regulate the TCP/IP network traffic coming in and out of a machine. Answers b and c both point to valid firewalling packages, but these packages are used for an entire LAN, not just one machine. Answer d points to the commun-ications protocol used to transmit data over the Internet. Answer e points to an invalid package.


What type of server is used to remotely assign IP addresses to machines during the installation process?


you can use a DHCP server to assign IP addresses to individual machines during the installation process. Answers a, b, d, and e list legitimate Linux servers, but these servers do not provide IP addresses. The SMB, or Samba, tool
is used for file and print sharing across multi-OS networks. An NFS server is for file sharing across Linux net-works. FTP is a file storage server that allows people to browse and retrieve information by logging in to it, and HTTP is for the Web


Which partitioning tool is available in all distributions?


The fdisk partitioning tool is available in all Linux distributions. Answers a, c, and e all handle partitioning, but do not come with all distributions. Disk Druid is made by Red Hat and used in its distribution along with some derivatives. Partition Magic and System Commander are tools made by third-party companies. Answer d is not a tool, but a file system type. Specifically, FAT32 is the file system type used in Windows 98.
Which first-level segment of the file system contains a majority of system
The /etc portion of the file system contains a number of system and daemon configuration files. Answers a, c, d, and e are valid first-level directories, but are incorrect. The /var directory contains items that change on a regular basis, such as log files and print and mail spool directories. The /bin directory contains system binaries, whereas the /sbin directory contains binaries that run with SUID privileges or as a specific user. The /lib directory contains system libraries, both shared and non-shared.


Which file do you edit to set partitions to mount at boot time?


The file /etc/fstab manages which partitions are automatically mounted onto the file system. Answers b and c refer to valid items, but they are not used to manage the file system. The file /etc/services maps networking services to the ports they utilize, and /etc/smb.conf is the configuration file for the Samba service. Answers d and e point to files that do not exist.


Which first-level segment of the file system contains a majority of system and server configuration files within its subdirectories?


The /etc portion of the file system contains a number of system and daemon configuration files. Answers a, c, d, and e are valid first-level directories, but are incorrect. The /var directory contains items that change on a regular basis, such as log files and print and mail spool directories. The /bin directory contains system binaries, whereas the /sbin directory contains binaries that run with SUID privileges or as a specific user. The /lib directory contains system libraries, both shared and non-shared.


Which file do you edit to set partitions to mount at boot time?


The file /etc/fstab manages which partitions are automatically mounted onto the file system. Answers b and c refer to valid items, but they are not used to manage the file system. The file /etc/services maps networking services to the ports they utilize, and /etc/smb.conf is the configuration file for the Samba service. Answers d and e point to files that do not exist.


Which shell do you assign to a POP3 mail-only account?


You assign a POP3 only account to the /bin/false shell. Answers b and c both point to the same shell, the bash shell. However, assigning this shell to a POP3 only user gives him or her login access, which is what you are trying to avoid. Answers d and e are both invalid options in a standard setup.


What command would you use to create an empty file without opening it to edit it?


You use the touch command to create an empty file without needing to open it. Answers a and e point to invalid commands, though either of these might actually be aliased to point to a real command. Answers b and c utilize editors, and so do not satisfy the requirements of the question.
actually touch is used to change the timestamps of a file if its exits, otherwise a new file with current timestamps will be created


Which command do you use to change run levels?


The command used to change run levels is init. Answers a, c, and d point to invalid commands. Answer b is a valid command, but does not set the current run level. The run level command displays the current run level, and the one that was used directly before entering this one.


Which daemon controls the network service -> POP3 mail service?


The inetd superdaemon controls the POP3 mail service. The POP3 mail service runs through the superdaemon, not on its own. Answers c and e point to nonexistent, or at least nonstandard daemons. Answer d points to the Usenet news daemon.


Who owns the data dictionary ?


The SYS user owns the data dictionary. The SYS and SYSTEM users are created when the database is created.
The SYS user owns the data dictionary. The SYS and SYSTEM users are created when the database is created.
how we can configure sata hard derive during redhat 9 installation.
Have the data driver on a floppy drive. At the start of installation, when u boot
from the CD/DVD, on the prompt, write “dd”. It will ask for the driver floppy later on and will load the sata driver. Then you can configure/partition the drive using disk druid or fdisk.


What is difference between AT and CRON?


cron can be set only for a particular time but at is used to schedule and execute
Contact Author Contact Author Cron command is used to schedule the task daily at the same time repeatedly ,”at” command is used to schedule the task only once i.e. to run only one time.


What is difference between user right and user permission?


user rights:user rights is that user is authorized to used password. if his password/file/dir is expired he is not able to login
user permission:permission is user is permitted to use file/directory. that is authentication
if he is authentication for particular file or not.
it might be true as per my suggestion.


What is the real mean of DHCP?


dynamic Host Configuration Protocol(DHCP) is a protocol used by networked devices (clients) to obtain the IP address.
Contact Author Contact Author Dynamic addressing simplifies network administration because the s/w keeps track of IP addresses rather than requiring an administrator to manage the task. That means new computer
can be added to the network without any risk of manually assigning unique IP address.
Describe the boot process of your favorite Linux in as much detail as you can.
Booting process : first BIOS loads the boot loaders, then boot loaders loads the kernel ,then kernel mount the file systems and drivers installation will takes place and in it will be loaded.
How to install 8139 realtek drivers in rhel5.0$ Please help me out.
Download the driver from internet.
then just unzip the tarball using tar -zxvf
then for first compile it using make and make install
For proper installation of the driver read the INSTALL / README file given in the tarball.


What is difference between user right and user permission?


user rights:user rights is that user is authorized to used password. if his password/file/dir is expired he is not able to login user permission:permission is user is permitted to use file/directory. that is authentication if he is authentication for particular file or not.
it might be true as per my suggestion.


What is the real mean of DHCP?


Dynamic addressing simplifies network administration because the s/w keeps track of IP addresses
rather than requiring an administrator to manage the task. That means new computer can be added to
the network without any risk of manually assigning unique IP address.


Describe the boot process of your favorite Linux in as much detail as you can?


Boot process takes place in 4 scenes with 4 main characters.
Scene 1
when the computer is switched on, it automatically invokes BIOS[a ROM chip embedded in the motherboard].The BIOS will start the processor and perform a POST[power on self test] to check whether the connected device are ready to use and are working properly. Once the POST is completes BIOS will jump to a specified location in the RAM and check for the booting device. The boot sector is always the first sector of the hard disk and BIOS will load the MBR into the memory.
Scene 2
Here the boot loader takes the control of the booting process.LILO or GRUB is the boot loaders commonly available. It will help the user to select various boot options. Depending on the boot option selected the kernel is loaded.
scene 3
After kernel is loaded the kernel will take the control of the booting process and it will initialize all the hardwares including I/O processors etc.kernel then creates a root device and mounts the partitions.
Scene 4
INIT is loaded.


What is the minimum number of partitions you need to install Linux? What command can you use to review boot messages?


1. Three Partition.
boot partition, swap partition and root partition, these are the minimum partitions to install
the Linux.
2. dmesg or /var/log/messages
What command you execute to display the last five commands you have entered$ Which partitions might you creates on mail server HDDs other than the root, swap and boot partitions$ Which partitioning tool is available in all distributions$ Which two commands can you use to delete directories$ Which file defines all users on your system$
1. history|tail -5
2. /var
3. fdisk, parted
4. rm, rmdir
5. /etc/passwd


How to install 8139 realtek drivers in rhel5.0? Please help me out?


Download the driver from internet.
then just unzip the tarball using tar -zxvf
then for first compile it using make and make install
For proper installation of the driver read the INSTALL / README file given in the tarball.


What does Security-enhanced Linux give me that standard Linux can’t?


The Security-enhanced Linux kernel enforces mandatory access control policies that confine user programs and system servers to the minimum amount of privilege they require to do their jobs. When confined in this way, the ability of these user programs and system daemons to cause harm when compromised (via buffer overflows or misconfigurations, for example) is reduced or eliminated. This confinement mechanism operates independently of the traditional Linux access control mechanisms. It has no concept of a “root” super-user, and does not share the well-known shortcomings of the traditional Linux security mechanisms (such as a dependence on setuid/setgid binaries).The security of an unmodified Linux system depends on the correctness of the kernel, all the privileged applications, and each of their configurations. A problem in any one of these areas may allow the compromise of the entire system. In contrast, the security of a modified system based on the Security-enhanced Linux kernel depends primarily on the correctness of the kernel and its security policy configuration. While problems with the correctness or configuration of applications may allow the limited compromise of individual user programs and system daemons, they do not pose a threat to the security of other user programs and system daemons or to the security of the system as a whole.


What is SELinux?


SELinux
Security-enhanced Linux is a research prototype of the Linux® kernel and a number of utilities with enhanced security functionality designed simply to demonstrate the value of mandatory access controls to the Linux community and how such controls could be added to Linux. The Security-enhanced Linux kernel contains new architectural components originally developed to improve the security of the Flask operating system. These architectural components provide general support for the enforcement of many kinds of mandatory access control policies, including those based on the concepts of Type Enforcement®, Role-based Access Control, and Multi-level Security.


What is the most graceful way to get to run level single user mode?


The most graceful way is to use the command init s.
If you want to shut everything down before going to single user mode then do init 0 first and from the ok prompt do a boot -s.
Write a command to find all of the files which have been accessed within the last 10 days.
The following command will find all of the files which have been accessed within the last 10 days
find / -type f -atime -10 > December.files
This command will find all the files under root, which is ‘/’, with file type is file. ‘-atime -30′ will give all the files accessed less than 10 days ago. And the output will put into a file call Monthname.files.


What is the main advantage of creating links to a file instead of copies of the file?


The main advantage is not really that it saves disk space (though it does that too) but, rather, that a change of permissions on the file is applied to all the link access points. The link will show permissions of lrwxrwxrwx but that is for the link itself and not the access to the file to which the link points. Thus if you want to change the permissions for a command, such as su, you only have to do it on the original. With copies you have to find all of the copies and change permission on each of the copies.


What is LILO?


LILO stands for Linux boot loader. It will load the MBR, master boot record, into the memory, and tell the system which partition and hard drive to boot from.


What is CVS?


CVS is Concurrent Version System. It is the front end to the RCS revision control system which extends the notion of revision control from a collection of files in a single directory to a hierarchical collection of directories consisting of revision controlled files. These directories and files can be combined together to form a software release.
There are some useful commands that are being used very often. They are
cvs checkout
cvs update
cvs add
cvs remove
cvs commit


What is NFS? What is its job?


NFS stands for Network File System. NFS enables filesystems physically residing on one computer system to be used by other computers in the network, appearing to users on the remote host as just another local disk.


In Linux OS, what is the file server?


The file server is a machine that shares its disk storage and files with other machines on the network.


What are the techniques that you use to handle the collisions in hash tables?


We can use two major techniques to handle the collisions. They are open addressing and separate chaining. In open addressing, data items that hash to a full array cell are placed in another cell in the array. In separate chaining, each array element consists of a linked list. All data items hashing to a given array index are inserted in that list.


What is the major advantage of a hash table?


The major advantage of a hash table is its speed. Because the hash function is to take a range of key values and transform them into index values in such a way that the key values are distributed randomly across all the indices of a hash table.


What is Write Command ?


The write command enables you to write an actual message on the other terminal online. You have to issue the write command with the login ID of the user with whom you want to communicate. The write command informs the user at the other end that there is a message from another user. write pastes that message onto the other user’s terminal if their terminal’s write permissions are set. Even if they are in the middle of an edit session, write overwrites whatever is on the screen. The edit session contents are not corrupted; you can restore the original screen on most editors with Ctrl-L. write is mostly used for one-way communication, but you can have an actual conversation as well


Why You Shouldn’t Use the root Login?


The root login does not restrict you in any way. When you log in as root, you become the system. The root login is also sometimes called the super user login. With one simple command, issued either on purpose or by accident, you can destroy your entire Linux installation. For this reason, use the root login only when necessary. Avoid experimenting with commands when you do log in as root.


How big should the swap-space partition be?


Swap space is used as an extension of physical RAM, the more RAM you have, the less swap space is required. You can add the amount of swap space and the amount of RAM together to get the amount of RAM Linux will use. For example, if you have 8MB of RAM on your machine’s motherboard, and a 16MB swap-space partition, Linux will behave as though you had 24MB of total RAM.


Which field is used to define the user’s default shell?


command-The last field, called either command or login command, is used to specify what shell the user will use when he logs in.


When you create a new partition, you need to designate its size by defining the starting and ending?


cylinders-When creating a new partition you must first specify its starting cylinder. You can then either specify its size or the ending cylinder.


What can you type at a command line to determine which shell you are using?


echo $SHELL-The name and path to the shell you are using is saved to the SHELL environment variable. You can then use the echo command to print out the value of any variable by preceding the variable’s name with $. Therefore, typing echo $SHELL will display the name of your shell.


In order to display the last five commands you have entered using the fc command, you would type?


fc -5-The fc command can be used to edit or rerun commands you have previously entered. To specify the number of commands to list, use -n.


What command should you use to check your file system?


fsck-The fsck command is used to check the integrity of the file system on your disk.


What file defines the levels of messages written to system log files?


kernel.h-To determine the various levels of messages that are defined on your system, examine the kernel.h file.


What account is created when you install Linux?


root-Whenever you install Linux, only one user account is created. This is the super user account also known as root.


What daemon is responsible for tracking events on your system?


Syslogd-The syslogd daemon is responsible for tracking system information and saving it to specified log files.


Where standard output is usually directed?


To the screen or display-By default, your shell directs standard output to your screen or display.


What utility can you use to show a dynamic listing of running processes?


Top-The top utility shows a listing of all running processes that is dynamically updated


Who owns the data dictionary?


The SYS user owns the data dictionary. The SYS and SYSTEM users are created when the database is created.


Compare Linux credit based algorithm with other scheduling algorithms?


For the conventional time –shared processes, Linux uses a prioritized, credit-based algorithm. Each process possesses a certain number of scheduling credits; when a new task must be chosen to run, the process with most credits is selected. Every time that a timer interrupt occurs, the currently running process loses one credit; when its credits reaches zero, it is suspended and another process is chosen. If no runnable processes have any credits, then Linux performs a recrediting operation, adding credits to every process in the system (rather than just to the runnable ones), according to the following rule:
Credits = credits/2 + priority
The above scheduling class is used for time-shared process and the in Linux for the real-time scheduling is simpler it uses scheduling classes: first come, first served
(FCFS), and round-robin (RR) .In both cases, each process has a priority in addition to its scheduling class. In time-sharing scheduling, however, processes of different priorities can still compete with one another to some extent; in real-time scheduling, the scheduler always runs the process with the highest priority. Among processes of
equal priority, it runs the process that has been waiting longest. The only difference between FCFS and RR scheduling is that FCFS processes continue to run until they either exit or block, whereas a round-robin process will be preempted after a while and will be moved to the end of the scheduling queue, so round-robin processes of equal priority will automatically time share among themselves.
Linux’s real-time scheduling is soft-real time rather than hard-real time. The scheduler offers strict guarantees about the relative priorities of real-time processes, but the kernel does not offer any guarantees about how quickly a real-time process will be scheduled once that process becomes runnable. Thus the Linux uses different scheduling classes for time-shared and real-time processes.

No comments:

Post a Comment