Sunteți pe pagina 1din 15

Q.What is BSS(Block Started by Symbol)? A.UNIX linkers produce uninitialized data segments.

The segments that contain the program code and data are called text segments. These segments contain initialized data. The objects in the Block Started by Symbol segment contain only a name and size but not the value. Q.What is Page-Stealer process? Explain the paging states for a page in memory. A.The pages that are eligible for swapping are found by the Page-Stealer and places the page numbers in a list which contains the pages to be swapped. The paging states are 1. aging and is not yet eligible for swapping and 2. eligible for swapping but not yet eligible for re assignment to other virtual address space. Q.Explain the phases of swapping a page from the memory. A.The phases of swapping a page from the memory are: The eligibility for swapping a page will found by the page stealer and the page number available in the list of pages will be swapped.The page is copied by the kernel to a swap device and the valid bit available in the page table entry clearance is done. The pfdata reference count will be decremented and the pfdata table entry is placed at the end of the free list in case its reference count is 0. Q.What is Demand Paging? Explain the conditions for a machine to support Demand Paging. A.The process of mapping a large address space into a relatively small amount of physical memory is known as demand paging. The accomplishment of demand paging is done by implementing backing store. The conditions are: 1.Pages based memory architecture. 2.'restartable instructions support by the machine Q.Difference between Fault Handlers and the Interrupt handlers. A.Fault handlers can sleep, where as interrupt handlers cannot. The fault handlers sleep stage occurs by the memory fault which is in context of the process. Q.What is validity fault? In what way the validity fault handler concludes? A.Validity fault is the result of non setting of valid bits in main memory at the time of refererring a page by a process. This happens when the pages are available outside the virtual address space of a process or the pages are the part of the virtual address space where the physical address space is assigned to it.The setting the valid bit of the page is the process of handling validity fault by the way of clearing the modify bit and reclaculating the process priority. Q.What is ex and vi? Explain their purposes. A.ex,is the line editor mode of vi editor. It allows to 1.write LISP programs

2.list all the files saved as the result of an editor or system crash 3.prevent the accidental overwriting of files 4.encrypt and decrypt the files vi screen oriented visual editor. It performs almost all the operations that are supported by ex. It has the additional features to edit, save lines and files. It provides the cursor movement options, editing options. Useful to write shell scripting in Linux/Unix. Q.Explain how the Kernel handles both the page stealer and the fault handler. A.When the memory shortage occurs then the page stealer and fault handler thrashes. The fault handler will be slept when the sum of the working sets of all the processes is more than the physical memory. The system throughput reduction is the restult of this process, because the time spent by kernel for the overhead is too much. The memory is rearraged in the frantic pace. Q.What is kill()? Explain its possible return values. A.kill() is a system call which stops a process. The return values of kill() are: 1.0 Process is existing with the given PID, and signals can be sent to it. 2.1 The errno == ESRCH is true. This implies the non-existence of a process with a given PID or causing the denial of system by security enhancements for its existence. 3.-1 The errno == EPERM is true. This implies that the kill proess will not be allowed by the system with the given PID, which implies that the process exists or the enhancements are present by draconian security.At times some other values returned by errno. Q.Explain the steps that a shell follows while processing a command. A.The sequence of executing commands by shell are as follows: 1.Parsing: The command is broke into words, by using the spaces as delimiters unless quoted. The tabs are replaced by a single space. 2.Evaluation of a variable: The words with $ as preceding character will be evaluted unless quoted. 3.Command Substitution: The commands surrounded by backquotes will be executed by the shell. Later these will be replaced into standard output of the command into command line. 4.Wild card interpretation: Finally, the shell identifies all the wild cards(?,*) in the command line and replaces the wild card with sorted list of file names which maches the pattern. 5.PATH evaluation: Ultimately shell looks for the PATH variable for the purpose of determining the sequence of directories to search for the files or commands. Q.What is the difference between cmp and diff commands? Provide an example for each. A.cmp Byte by byte comparision performed for two files comparision and displays the first mismatch byte.

cmp returns the 1st byte and the line no of the fileone to make the changes to make the fileone identical to filetwo. Directory names can not be used. diff Indicates the changes that are to be done to make the files identical.It returns the text of filetwo that is different from filetwo.The Directory names can be used. Q.What is the use of grep command? Provide an example A.Grep stands for regular expression. grep command is used to find the patterns in a text file provided by the user. It returns true if the pattern is found in the file, otherwise false. Examples: grep Lin file1 file2 file3 searches the files file1, file2, file3 for the lines which contains the string Lin. grep Linux learning is great file1 file2 file3 searches the files file1, file2, file3 for the lines which contains the string Linux learning is great. grep -c Linux operatinsystems displays only the number of times that the pattern is matched in the file but not the lines. grep -r 'Linus Torvalds' * searches for the files in current and all the sub directories for the pattern (Linus Torvalds). Q.Difference between cat and more command. A.The file contents are displayed by cat command. The contents will scroll off the screeen, when the file contents are more than one screen page.The file contents are displayed page by page with the use of more command.Examples cat linux.txt displays the contents of the file linux.txt ls l | more displays the file and directory names. Halts once the screen page is full and prompts to press a key to continue Q.What is du command? What is its use? A.The du (disk usage) command is used to report the size of directory trees. These include the contents and the size of all files. It is useful to use du command for the purpose of tracking down the space hogs. A hog is an excessive or large space occupied by the files and directories on a secondary storage media.The command du is mostly

employed by the system administrators. They use du as a supplement to the automated monitoring system programs which help to prevent the key directories and partitions from being full. Q.Explain the various prompts that are available in a UNIX system. A.UNIX supports 4 prompts: 1.PS1: default prompt 2.PS2: for the purpose of multi-line input 3.PS3: for printing the select command 4.PS4: for printing before the output if x is set. Q.Describe how the kernel differentiates device files and ordinary files. A.There are 2 device files. They are character device file and block device file. To distinguish these two, specify b for block device file and c for character device file in the inode structure of the file.An ordinary file does not require these fields. Q.Describe initial process sequence while the system boots up. A. 1) BIOS: Loads the boot sector from the storage media. The order of booting can be changed using BIOS. 2) (DOS) Master Boot Record (MBR): DOS option includes MS-DOS, Windows. The first 512 bytes off the disk i.e., /dev/had will be executed by BIOS. The standard MBR looks for the primary partition i.e., /dev.hda1-4 which is marked bootable. 3) LILO: The kernel image is to be loaded as it does not understand the file system code. The kernel image is persisted as raw disk offsets using BIOS routines to load the sequence. Typically the menu code is available in /boot/boot.b and prompts for the partition or kernel for image (Linux) or other (DOS) to load first 512 bytes of the partition. 4) Kernel: Initializes devices, loads initrd optionally, mounts root file system that is specified by lilo or loadin with root=parameter. Runs /sbin/init which has the process number 1(PID = 1) and prints the version number. 5) /sbin/init: Reads the /etc/inittab. Executes the boot scripts debian in turn runs /etc/rcS.d/S* scripts, runs the programs available in /etc/inittab. 6) Run Levels: The default level is defined in /etc/inittab. Ex: id: 3: initdefault: The other levels are: 0. halt 1. single user 2. Full Multi-User modes (default)

3-5.Same as 2 6.Reboot Q.What is a shell? What are shell variables? A.A shell us an interface to the user of any operating system. The users instruct an operation to the computer by typing commands as text for the execution. Shell variables are special variables. They are name and value pairs created and maintained by the concerned shell. For example: PATH, HOME, MAIL, TERM etc. Q.Explain how the inode maps to data block of a file. A.There are 13 block addresses in inode. The file descriptions type of file, access rights, and owners, time stamps of the files, size, and pointers to data blocks are contained in each inode.The first 10 block addresses are called direct block addresses which are the data blocks for the first 10 in the file.The 11th, 12th and 13th addresses are pointed to a one-level index block and two-level index block and three-level index blocks respectively. Q.Explain some system calls used for process management. A.The following are the system calls: 1.fork() - For creating child process 2.vfork() - For creating child process only to copy-on-write 3.exec() - For performing a different task. 4.wait() - To make a process to wait for completion of execution. 5.kill() - For sending a signal to a process 6.signal() - For handling a signal. 7.exit() - To exit out of execution of a process 8.exit() - To exit out of execution of a process without clean up. Q.Explain how to get/set an environment variable from a program. A.In C programming language: An environment variable can get using the function getenv(). In Shell scripting: The environment variable itself can be used as: MAIL_DELIVERY_COMPLETE=0 PATH=$PATH:/home/myuser/*.jar Q.Describe how a parent and child process communicates each other. A.The inter communication between a child process and a parent process can be done through normal communication schemes such as pipes, sockets, message queues,shared memories. There are special ways to inter communicate which has advantage of the relationships.One of the most obvious advantages is that the exit status of the child process can be obtained by the parent process.By communicating with unnamed pipes, the creation on pipe should be done before the creation of child. This process is called forking. Soon after forking,the parent properties will be inherited by child, also the pipe. The communication between parent and child is done with this pipe.

Q.What is a Daemon? A.Daemon is the short form for Disk and Execution Monitor. A daemon is a background process which answers requests for services in a long-running mode. In UNIX, the names of daemons are end withd conventionally. Some of the daemons are inetd, httpd, nfsd, sshd, named, and lpd . Q.What is 'ps' command for? A.The shortage for process status is ps. This command is used to display the currently running processes on Linux/Unix systems. It is like task manager in Windows. To stop the currently running process for the purpose of gaining the system speed, and find out the processes that are running on the remote system, the ps command is a tool. Stopping of a process can be done by kill command. Q.How the Swapper works? A.Moving the information from fast access memory and slow access memory and vice versa is known as swapping. The physical RAM is divided into chunks of memory known as pages. A page of memory is copied to the preconfigured space on the hard disk, for the purpose of freeing up that page of memory. To perform swapping, the commands swapon and swapoff are used in linux/unix. The swapon is to enable the swapping and the swapoff is to disable swapping. Q.What is the difference between Swapping and Paging? A.Swapping performs the whole process to transfer to the disk, where as paging performs the part of the process is transferred to the disk by making the rest of the process available in the physical memory.Page-ins and page-outs are the processors those are moved from and to the physical memory to the disk in paging.Swap-ins and swap-outs are the processes those are moved from and to the physical memory to the disk in swapping. Q.What is Expansion swap? A.Expansion swap is a part of hard disk. This is reserved for the purpose of storing chunks of a program that is executing which is swapped out of the memory in order to make space available for other programs. Q.What is Fork swap? A.For creation of child process, fork() system call is invoked. At the time of processing the fork() call by parent, the child process is created. In case of shortage of memory, the child process will be sent to the read-to-run state in the swap device. It returns to the user state without performing the swapping the state of parent. Once the memory is available, the child process swapping is done into the main memory. Q. What are the requirements for a swapper to work? A.The functionality of a swapper is on the scheduling priority which is highest. The swapper searches for sleeping process. It searches for the processes that are ready to run for swapping, if the sleeping process not found.The requirement for the swapper is to work for the process that is ready to run and must be the resident for at least 2 seconds

before swapping out. The process must be resided in the swap device for at least 2 seconds, for any swapping. The swapper will go into the wait state, if the requirement is not satisfied, for that event. It will be awaken once in a second by the kernel of the OS. Q.What is the principle of locality? A.The next most data item or instruction is the closest to the current data item or instruction. For example, a block in a file may be the closest one that is needed next. The OS can read the next block before its need and made available it on hand at the time of issuing the actual read request. Q.What is page fault? Its types. A.One of the critical parts of code in the Linux kernel. It has a major influence on memory subsystems performance. A process has a page table, also called as map that contains page table entries that points to the assigned memory to the process and communicates to the CPU, the memory locations which are valid for accessing a process. Each process is assigned to a memory chunk named as pages. A page table that is does not map memory area access, will result in generation of page fault by CPU. Q.Difference between the fork() and vfork() system call. A. 1.fork: Both the parent and child share all of the page tables until any one of them does a write. Then paging will create private page copy of the dirty page for the purpose of modifying process. This process is done on demand. 2.vfork - In this system call until child exits or execs, the parent will be suspended. The memory and stack are shared by the child. Q.What is protection fault? A.Protection fault is a name of an error. This error occurs when accessing storage space is tried by an application program which is not designated for its use. Protectin fault is also most likely to occur when a beta test version of a software is tried to access. Q.Explain use of pipes. A.Uses of Pipe 1.Several powerful functions can be in a single statement 2.Streams of processes can be redirected to user specified locations using > 3.Pipes are useful to chain up several programs, so that multiple commands can execute at once without using a shell script. Q.Explain trap command, shift Command, getopts command of linux. A.Trap command: controls the action to be taken by the shell when a signal is received. Trap [OPTIONS] [ [arg] signspec..] Arg is the action to be taken or executed on receiving a signal specified in signspec. e.g. trap rm $FILE; exit // exit (signal) and remove file (action)

Shift Command: Using shift command, command line arguments can be accessed. The command causes the positional parameters shift to the left. Shift [n] where n defaults to 1. It is useful when several parameters need to be tested. Getopts command: this command is used to parse arguments passed. It examines the next command line argument and determines whether it is a valid option Getopts {optstring} {variable1}. Here, optsring contains letters to be recognized if a letter is followed by a colon, an argument should be specified. E.g (whether the argument begins with a minus sign and is followed by any single letter contained inside options ) If not, diagnostic messages are shown. It is usually executed inside a loop. Q.What Stateless Linux server? A.A stateless Linux server is a centralized server in which no state exists on the single workstations. There may be scenarios when a state of a partilcuar system is meaningful (A snap shot is taken then) and the user wants all the other machines to be in that state. This is where the stateless Linux server comes into picture.Stateless linux is a way how a system is to run and be managed. Being a stateless system, a system should be able to be replaced at any time with or without local storage media. In case of hard drive crash, the command resync can be used to a new drive. If server goes offline, a new virtual instance that is running the OS image off of the network storage. Q.What are the feature of Stateless Linux server? A.Features: 1.It stores the prototypes of every machine 2.It stores snapshots taken for those systems 3.It stores home directories for those systems 4.Uses LDAP containing information of all systems to assist in finding out which snapshot (of state) should be running on which system. Q.What does nslookup do? Explain its two modes. A.Nslookup is used to find details related to a Domain name server. Details like IP addresses of a machine, MX records, servers etc. It sends a domain name query packet to the corresponding DNS.Nslookup has two modes. Interactive and non interactive. Interactive mode allows the user to interact by querying information about different hosts and domains.Non interactive mode is used to fetch information about the specified host or domain.The two modes of nslookup are: Interactive and non-interactive. 1.Using interactive mode user can query the name servers for the information pertaining to hosts and domains. 2.Using non-interactive mode the user can just print the name and requested information of a host. Interactive mode:

Nslookup [options] [server] Q.What is Bash Shell? A.Bash is a free shell for UNIX. It is the default shell for most UNIX systems. It has a combination of the C and Korn shell features. Bash shell is not portable. any Bashspecific feature will not function on a system using the Bourne shell or one of its replacements, unless bash is installed as a secondary shell and the script begins with #!/bin/bash. It supports regular and expressions. When bash script starts, it executes commands of different scripts. Bash stands for "Bourne Again Shell. A shell is the user interface. Bash is more convenient shell for users among others. The scripts written in Bash are portable among machines, distributions and even operating systems. Q.Explain some Network-Monitoring Tools in Linux: ping, traceroute, tcpdump, ntop A.Network monitoring tools are used to monitor the network, systems present on the network, traffic etc. 1.Ping: Ping command is used to check if the system is in the network or not. To check if the host is operating.e.g. ping ip_address When the command is executed, it returns a detailed summary of the host. Packets sent, received, lost by estimating the round trip time. 2.Traceroute: the command is used to trace the path taken by the packet across a network. Tracing the path here means finding out the hosts visited by the packet to reach its destination. This information is useful in debugging. Roundtrip time in ms is shown for every visit to a host. 3.Tcpdump: commonly used to monitor network traffic. Tcdump captures and displays packet headers and matching them against criteria or all. It interprets Boolean operators and accepts host names, ip address, network names as arguments. 4.Ntop: Network top shows the network usage. It displays summary of network usage by machines on the network in a format as of UNIX top utility. It can also be run in web mode, which allows the display to be browsed with a web browser. It can display network traffic statistics, identify host etc. Interfaces are available to view such information. Q.How does the linux file system work? A.Linux file structure is a tree like structure. It starts from the root directory, represented by '/', and then expands into sub-directories. All the partitions are under the root directory. If a partition is mounted (The mount point defines the place of a particular data set in the file system) anywhere apart from a device, the system is not aware of the existence of that partition or device. Directories that are only one level below the root directory are often preceded by a slash, to indicate their position.

1.Root "/" file system: The kernel needs a root file system to mount at start up. The root file system is generally small and should not be changed often as it may interrupt in booting. The root directory usually does not have the critical files. Instead sub directories are created. E.g. /bin (commands needed during bootup), /etc (config files) , /lib(shared libraries). 2./usr filesystem : this file system is generally large as it contains the executable files to be shared amongst different machines. Files are usually the ones installed while installing Linux. This makes it possible to update the system from a new version of the distribution, or even a completely new distribution, without having to install all programs again. Sub directories include /bin, /include, /lib, /local (for local executables) 3./var filesystem : this file system is specific to local systems. It is called as var because the data keeps changing. The sub directories include /cache/man (A cache for man pages), /games (any variable data belong to games), /lib (files that change), /log (log from different programs), /tmp (for temporary files) 4./home filesystem: - this file system differs from host to host. User specific configuration files for applications are stored in the user's home directory in a file. UNIX creates directories for all users directory. E.g /home/my_name. Once the user is logged in ; he is placed in his home directory. 5./proc filesystem : this file system does not exist on the hard disk. It is created by the kernel in its memory to provide information about the system. This information is usually about the processes. Contains a hierarchy of special files which represent the current state of the kernel .Few of the Directories include /1 (directory with information about process num 1, where 1 is the identification number), /cpuinfo (information about cpu), /devices (information about devices installed), /filesystem (file systems configured), /net (information about network protocols), /mem (memory usage) At the time of installation of Linux, a file system is assigned and persists in the hard disk. This file system structure resembles a tree. A file can be a list of names and numbers or executable programs. Linux treats every program as a file. Linux treats directories and computer components also as files.A file could be a list of names and numbers, a cheesecake recipe, or an executable program. But under Linux, everything is a file. In addition to data and executable files, Linux treats directories and even the various components of your computer as files. It could be a keyboard, console, and printer, RAM or ROM. These are referred as special files known as devices. These files are available in /dev directory. Linux performs the communication with these devices by simply reading from or writing to these special files. Q.What are the process states in Linux? A.The following are the process states:

1. Running: This is a state where a process is either in running or ready to run. 2. Interruptible: This state is a blocked state of a process which awaits for an event or a signal from another process 3. Uninterruptible: It is also a blocked state. The process is forced to halt for certain condition that a hardware status is waited and a signal could not be handled. 4. Stopped: Once the process is completed, this state occurs. This process can be restarted 5. Zombie: In this state, the process will be terminated and the information will still be available in the process table. Q.What is a zombie? A.Zombie is a process state when the child dies before the parent process. In this case the structural information of the process is still in the process table. Since this process is not alive, it cannot react to signals. Zombie state can finish when the parent dies. All resources of the zombie state process are cleared by the kernel.Dead process is called a zombie. The processes will die eventually at the time when they become zombies. A dead process cannot be killed. The parent process will send a signal to the operating system that is not needed the zombie by using wait () system call. Q.Explain each system calls used for process management in linux. A.Process management uses certain system calls. They are explained below. 1. To create a new process fork () is used. 2. To run a new program = exec () is used. 3. To make the process to wait = wait () is used. 4. To terminate the process exit () is used. 5. To find the unique process id getpid () is used. 6. To find the parent process id getppid () is used. 7. To bias the currently running process property nice () is used. Q.What is Linux and why is it so popular? A.Linux is an operating system that uses UNIX like Operating system. However, unlike UNIX, Linux is an open source and free software. Linux was originally created by Linus Torvalds and commonly used in servers.Linux is a multiuser, multitask GUI based open source operating system.Popularity of Linux is because of the following reasons 1.It is free and open source. We can download Linux for free and customize it as per our needs. 2.It is very robust and adaptable. 3.Immense amount of libraries and utilities 4.People who are familiar with UNIX can work on Linux with ease and comfort. 5.People who want great control over network security and on operating system Prior to Linux, there is UNIX. The desktop work stations from various companies were based on UNIX. Later a numerous companies entered and each one of them had their own UNIX version. As the proprietary authority is owned by each company and the lack of central authority weaken UNIX. As Linux is free and runs on any PC platform it gained the popularity very quickly.

Q.What is LILO? A.LILO is Linux Loader is a boot loader for Linux. It is used to load Linux into the memory and start the Operating system. LILO can be configured to boot other operating systems as well. LILO is customizable, which means that if the default configuration is not correct, it can be changed. Config file for LILO is lilo.conf.LILO stands for Linux Loader which is a bootstrap program. LILO is a code snippet which loads PC BIOS into the main memory at the time of starting the computer system. Q.What are the functions performed by LILO? A.LILO handles the following tasks: 1.Locating Linux kernel 2.Identifying other supporting programs and loading them in the memory 3.Staring Kernel The selection of various kernel images and boot routines is supported by LILO. For this reason, LILO is known as boot manager. Q.What is the difference between home directory and working directory? A.Home directory : It is the default working directory when a user logs in. On the other hand, working directory is the users current directory. Working directory can be changed. It can be changed using cd command.Home directory in Linux contains users personal data, configuration files, settings of a software etc. The content of home directory is private and the user has a complete control of it. Working directory: The directory in which the user is working currently is known as working directory. The home may also be the working directory, if the user is working in it. Q.What is the difference between internal and external commands? A.Internal commands are commands that are already loaded in the system. They can be executed any time and are independent. On the other hand, external commands are loaded when the user requests for them. Internal commands dont require a separate process to execute them. External commands will have an individual process. Internal commands are a part of the shell while external commands require a Path. If the files for the command are not present in the path, the external command wont execute.The commands that are directly executed by the shell are known as internal commands. No separate process is there to run these commands.The commands that are executed by the kernel are knows as external commands. Each command has its unique process id. Q.Explain the difference between a static library and a dynamic library? A.Static libraries are loaded when the program is compiled and dynamically-linked libraries are loaded in while the program is running. Dynamic libraries save the RAM space as against the static library because linking to static libraries includes the actual code for the library function(s)/procedure(s) with the executable. DLL code is kept at one location and is usually shared among all the processes that use the DLL.Static library has functionality that bound to a static program at compile time. Every static program has its own copy of library.Dynamic libraries are loaded into the memory and binds at run time.

The external functionality is accessed at runtime. This process reduces the overall footprint of memory. Q.What is NFS? A.NFS is Network File system. It is a file system used for sharing of files over a network. Other resources like printers and storage devices can also be shared. This means that using NFS files can be accessed remotely. Nfs command in linux can be used to achieve this. Q.What is its purpose? A.Purpose of NFS: 1.NFS can be used for sharing of files remotely. 2.Data can be stored on a single machine and still remain accessible to others over the network. 3.Reduction of the number of removable media drives throughout the network since they can be shared. NFS stands for Network File System. NFS is used to partition a disk on a remote machine disk. NFS allows a quick way of file sharing.The unwanted people access potential is provided by NFS to access hard drive in a network. So that an unauthorized user can not access ones email, delete the files. File services from windows can be accessed. In other words files from one operating system can be shared by another using NFS. Q.How do I send email with linux? A.Email can be sent in Linux using the mail command.Linux supports to work with sending mails using a set of commands called as mail commands. The command to send email is mail. The mail command is used to send and receive emails. Syntax: Mail [options] [users] Options are: -s,-c,-b Where s for subject, -c for copy and b for blind carbon copy E.g. mail user_name s hello E.g. mail username s Reports are needed It prompts displays the subject as Reports are needed.Similarly if c and b is given the mail will be sent to the corresponding recipients. Q.Explain RPM (Red Hat Package Manager) features. A.RPM is a package managing system (collection of tools to manage software packages).RPM is a powerful software management tool for installing, uninstalling, verifying, querying and updating software packages. RPM is a straight forward program to perform the above software management tasks. It is available with Fedora, Suse, CentOS, Mandriva Linux and other version of Linux.Its features are: 1.RPM can verify software packages. 2.RPM can be served as a powerful search engine to search for softwares.

3.Components, softwares etc can be upgraded using RPM without having to reinstall them 4.Installing, reinstalling can be done with ease using RPM 5.During updates RPM handles configuration files carefully, so that the customization is not lost. Q.What is Kernel? Explain the task it performs. A.Kernel is used in UNIX like systems and is considered to be the heart of the operating system. It is responsible for communication between hardware and software components. It is primarily used for managing the systems resources as well.Kernel is the component that is responsible for managing the resources of a computer system. Kernel Activities are: 1.The Kernel task manager allows tasks to run concurrently. 2.Managing the computer resources: Kernel allows the other programs to run and use the resources. Resources include i/o devices, CPU, memory. 3.Kernel is responsible for Process management. It allows multiple processes to run simultaneously allowing user to multitask. 4.Kernel has an access to the systems memory and allows the processes to access the memory when required. 5.Processes may also need to access the devices attached to the system. Kernel assists the processes in doing so.For the processes to access and make use of these services, system calls are used. 6.Provides the abstraction level for resources such as memory, processors, and I/O devices. 7.Performs inter process communication 8.Responds to system calls 9.Provides methods for synchronization and communication between processes. Q.What is Linux Shell? A.Linux shell is a user interface used for executing the commands. Shell is a program the user uses for executing the commands. In UNIX, any program can be the users shell. Shell categories in Linux are:Bourne shell compatible, C shell compatible, nontraditional, and historical.Linux shell is the user interface to communicate with Linux operating system. Shell interprets the user requests, executes them. Shell may use kernel to execute certain programs. Shell Script: A shell script is a program file in which certain Linux commands are placed to execute one after another. Q.What is Shell Script? A.A shell script, as the name suggests, is a script written for the shell. Script here means a programming language used to control the application. The shell script allows different commands entered in the shell to be executed. Shell script is easy to debug, quicker as compared to writing big programs. However the execution speed is slow because it launches a new process for every shell command executed. Examples of commands are cp, cn, cd.A shell script is a flat text file. Shell scripts are useful to accept inputs and provide output to the user. Everyday automation process can be simplified by a shell script.

Q.What are Pipes? A.A pipe is a chain of processes so that output of one process (stdout) is fed an input (stdin) to another. UNIX shell has a special syntax for creation of pipelines. The commands are written in sequence separated by |. Different filters are used for Pipes like AWK, GREP.e.g. sort file | lpr ( sort the file and send it to printer).Pipe is a symbol used to provide output of one command as input to another command. The output of the command to the left of the pipe is sent as input to the command to the right of the pipe. The symbol is |. For example: $ cat apple.txt | wc. In the above example the output of apple.txt file will be sent as input for wc command which counts the no. of words in a file. The file for which the no. of words counts is the file apple.txt.

S-ar putea să vă placă și