You are on page 1of 5

http://books.google.co.in/books?

id=GiEPNzcvr_IC&pg=SL16-PA34&lpg=SL16-PA34&dq=di fference+between+control+section+and+program+block&source=bl&ots=_vXlQcf3gC&sig= XrVM0mNExH9c1k37GhXqvhs4QKs&hl=en&ei=SSPRTvBFx6usB43skdoM&sa=X&oi=book_result&ct =result&resnum=1&ved=0CBwQ6AEwAA#v=onepage&q=difference%20between%20control%20se ction%20and%20program%20block&f=false

http://www.slideshare.net/kitturashmikittu/system-softwareloaders

Best Answer - Chosen by Voters The kernel The kernel is the hub of the operating system: it allocates time and memory to p rograms and handles the filestore and communications in response to system calls . The shell The shell acts as an interface between the user and the kernel. When a user logs in, the login program checks the username and password, and then starts another program called the shell. The shell is a command line interpreter (CLI). It int erprets the commands the user types in and arranges for them to be carried out. The commands are themselves programs: when they terminate, the shell gives the u ser another prompt. In computer operating systems, the kernel is the core operating system file set, while the "shell" is the graphical user interface, GUI The kernel of an operating system is something you will never see. It basically enables your programs to execute. It handles events generated by hardware (calle d interrupts) and software (called system calls), and manages access to ressourc es. The hardware-event handlers (interrupt handlers) will for instance get the numbe r of the key you just pressed and convert it to the corresponding character stor ed in a buffer so some program can retrieve it. The system calls are initiated by user-level programs, for opening files, starti ng other programs, etc. Each system call handler will have to check whether the arguments passed are valid, then perform the internal operation to complete the request. Most user programs do not directly issue system calls (except for ASM programs, for instance), but instead use a standard library which does the ugly job of for matting arguments as required by the kernel and generating the system call. (For example, the C function fopen() eventually calls a kernel function that actuall y opens the file.) The kernel usually defines a few abstractions like files, processes, sockets, di rectories, etc. which correspond to an internal state it remembers about last op

erations, so that a program may issue a session of operation more efficiently.

A shell is a special program that is usually integrated in any OS distribution a nd which offers humans an interface with the kernel. The way it appears to users may vary from system to system (command line, file explorer, etc), but the conc ept is always the same: * allow the user to select a program to be started, and optionnally give it sess ion-specific arguments * allow trivial operation on the local storage like listing the content of direc tories, moving and copying files across the system. In order to complete those actions, the shell may have to issue numerous system calls, like "open file 'x'; open file 'y' and create it if it doesn't exists; re ad content from X, write into Y, close both files, write "done" to standard outp ut". The shell may also be used by programs that want to start other programs but do not want to do 'all the ugly job' by themselves (e.g. completing file patterns l ike *.mp3, retrieving the exact path of the pro

Kernel is the main file that first addresses some of the hardware in your comput er as part of the operating system. It goes on to provide services to the operat ing system. A shell is an environment, like a DOS prompt or command line.

function can return value where as method can't that is the main difference betw een function and method

Write a shell script to display the processes in the system every 30 seconds fiv e times using while loop? #!/bin/ksh let j=5 while [ $j -gt 0 ] do PS -ed sleep 30 let j=$j-1 done

It's very simple to print out all of the environment variables, and some of the

values in the ENV array will be useful to you later, so let's try it. Create a n ew file, and name it env.cgi. Edit it as follows: #!/usr/bin/perl print "Content-type:text/html\n\n"; print <<EndOfHTML; <html><head><title>Print Environment</title></head> <body> EndOfHTML foreach $key (sort(keys %ENV)) { print "$key = $ENV{$key}<br>\n"; } print "</body></html>";

environment variables are a series of hidden values that the web server sends to every CGI you run. Your CGI can parse them, and use the data they send. Environ ment variables are stored in a hash called %ENV. How Can I Do Archiving With Tar? The tar Command The tar (tape archive) command bundles a bunch of files together and creates an archive (commonly called a tar file or tarball) on a tape, disk drive, or floppy disk. The original files are not deleted after being copied to the tar file. To create an archive using tar, use a command like this, which bundles all the f iles in the current directory that end with .doc into the alldocs.tar file: tar cvf alldocs.tar *.doc Here's a second example, which creates a tar file named panda.tar containing all the files from the panda directory (and any of its subdirectories): tar cvf panda.tar panda/ In these examples, the c, v, and f flags mean create a new archive, be verbose ( list files being archived), and write the archive to a file. You can also create tar files on tape drives or floppy disks, like this: tar cvfM /dev/fd0 panda Archive the files in the panda directory to floppy disk( s). tar cvf /dev/rmt0 panda Archive the files in the panda directory to the tape dri ve. The /dev/fd0 entry is Linux-ese for "floppy drive zero" (your A drive under DOS) , and /dev/rmt0 means "removable media tape zero," or your primary tape drive. T he M flag means use multiple floppy disks--when one disk is full, tar prompts yo u to insert another. To automatically compress the tar file as it is being created, add the z flag, l ike this:

tar cvzf alldocs.tar.gz *.doc In this example, I added the .gz suffix to the archive file name, because the z flag tells tar to use the same compression as the gzip command. To list the contents of a tar file, use the t (type) flag in a command, like thi s: tar tvf alldocs.tar List all files in alldocs.tar. To extract the contents of a tar file, use the x (extract) flag in a command, li ke this: tar xvf panda.tar Extract files from panda.tar. This will copy all the files from the panda.tar file into the current directory. When a tar file is created, it can bundle up all the files in a directory, as w ell as any subdirectories and the files in them. So when you're extracting a tar file, keep in mind that you might end up with some new subdirectories in the cu rrent directory. We've used several different flags in the sample tar commands so far. Here's a l ist of the most common flags: c Create a new archive. t List the contents of an archive. x Extract the contents of an archive. f The archive file name is given on the command line (required whenever the tar output is going to a file) M The archive can span multiple floppies. v Print verbose output (list file names as they are processed). u Add files to the archive if they are newer than the copy in the tar file. z Compress or decompress files automatically

Read more: http://lowfatlinux.com/linux-tar.html#ixzz1eptIIhCq 3. Using Make The Makefile is the key to the build process. In its simplest form, a Makefile i s a script for compiling or building the "binaries", the executable portions of a package. The Makefile can also provide a means of updating a software package without having to recompile every single source file in it, but that is a differ ent story (or a different article).

The idea behind make is that it simplifies the compilation of projects with mult iple files. Consider the above example (with two .cpp files). Compared to a sing le file project, you must issue two additional commands. Now, think about what h appens when your project consists of several more files. You will waste a lot of time typing. This is where make comes in handy. It automates compilation. It checks which fil es have been modified and based on dependencies (or rules) determines which obje ct files will need to be recompiled. In addition, it saves time by compiling onl y files that have changed since the last build. make is a UNIX command that looks for a file called Makefile or makefile. (Makef

ile is typically preferred because it appears at the beginning of the directory listing). Within the Makefile, there are variables and things called dependencie s. A simple make file for the project that we discussed above might look like th is left recursion A grammar is left-recursive if we can find some non-terminal A which will eventu ally derive a sentential form with itself as the left-symbol Connecting With Perl - Using Win32::ODBC

You might also like