Wednesday, November 22, 2006

Assign#2

What is Operating System

The most important program that runs on a computer.
Every general-purpose computer must have an operating system to run other programs. Operating systems perform basic tasks, such as recognizing input from the keyboard, sending output to the display screen, keeping track of files and directories on the disk, and controlling peripheral devices such as disk drives and printers.
For large systems, the operating system has even greater responsibilities and powers. It is like a traffic cop -- it makes sure those different programs and users running at the same time do not interfere with each other. The operating system is also responsible for security, ensuring that unauthorized users do not access the system.

Operating systems can be classified as follows:
• multi-user : Allows two or more users to run programs at the same time. Some operating systems permit hundreds or even thousands of concurrent users.
• multiprocessing : Supports running a program on more than one CPU.
• multitasking : Allows more than one program to run concurrently.
• multithreading : Allows different parts of a single program to run concurrently.
• real time: Responds to input instantly. General-purpose operating systems, such as DOS and UNIX, are not real-time.

Operating systems provide a software platform on top of which other programs, called application programs, can run. The application programs must be written to run on top of a particular operating system. Your choice of operating system, therefore, determines to a great extent the applications you can run. For PCs, the most popular operating systems are DOS, OS/2, and Windows, but others are available, such as Linux.

As a user, you normally interact with the operating system through a set of commands. For example, the DOS operating system contains commands such as COPY and RENAME for copying files and changing the names of files, respectively. The commands are accepted and executed by a part of the operating system called the command processor or command line interpreter. Graphical user interfaces allow you to enter commands by pointing and clicking at objects that appear on the screen.

2. What are the major components of OS?
What are the Functions and Components of a Operating System?

An operating system has two functions. It acts as a resource manager on the one side and a virtual machine on the other side. The resource manager of the operating system manages allocation of memory, processing time and disk space. The virtual machine should provide a nice user interface, other than the bare hardware would provide.
UNIX for instance has a resource manager, which allocates memory and processing time in a very efficient way. However the virtual machine leaves a lot to be desired on most UNIX systems. The Apple Macintosh in contrast provides a very nice virtual machine with its graphical user interface, but lacks features like protecting programs from each other and fair distribution of processor time. MS-DOS unfortunately provides neither a powerful resource manager nor a friendly virtual machine.

An operating system provides two main services: Filemanagement and Processmanagement.
Files
Processes
Shells
Files
Files are used to store data and directories are a way of organising files in a hierarchical structure. What UNIX does differently from DOS and other systems is the way it organises different physical storage devices.
In DOS there are individual drive names (actually letters from A to Z) denoting the different drives. In UNIX there is essentially just one virtual drive. All physical drives are sub-directories of this virtual drive or other drives.
Example: In DOS the first floppy disk drive is always A: and the first hard disk is always C:. When copying a file from the floppy disk directory flop_dir to the hard disk directory hard_dir, we issue the following instruction:
copy A:\flop_dir\file C:\hard_dir
Processes
A process is basically a program in execution. It consists of a program, its data, its ownership information (UID), the current position at which the computer is in the programs execution and all the other information needed to run the program. The UNIX operating system will occasionally decide to halt a process running and run another process. This gives every process its fair share of processing time. A process is also halted if it is waiting for some I/O operation to finish, like accessing a printer.
When a process is halted the operating system has to store all the information about the processes current state, so that the process can later be restarted exactly where it left off.
Processes can start other processes. These child processes have exactly the same ownership and permissions as the parent processes. Parents can control their children and send them signals. The operating system can also send signals to processes. Their are a wide variety of signals, and most programs react to signals by dying. There are a number of programs though, which are mostly operating system related and take more intelligent action towards signals sent to them.

Shells
The strict definition of an operating system limits it to only the basic program which runs the computer and provides systems calls to the users' programs. Usually the command interpreter or shell is not considered part of the operating system. But without the shell, which executes users' commands and programs, and is the primary interface between the computer and the user, a computer would be virtually impossible to use.
The basic function of a shell is to allow users to execute programs. Many advanced shells though have features which allow writing writing of scripts, command-line completion and command-line histories.
source:www.ask.com

Assign#3

UNIX COMMAND DESCRIPTION
a2p -Creates a Perl script from an awk script.
alias -Create a name for another command or long command string.
ac -Prints statistics about users' connect time.
ar -Maintain portable archive or library.
arch -Display the architecture of the current host.
as -An assembler.
at -Command scheduler.
awk -Awk script processing program.
basename -Deletes any specified prefix from a string.
bash -Command Bourne interpreter
bc -Calculator.
bdiff -Compare large files.
bfs -Editor for large files.
bg -Continues a program running in the background.
biff -Enable / disable incoming mail notifications.
break -Break out of while, for, foreach, or until loop.
bs -Battleship game.
bye -Alias often used for the exit command.
cal -Calendar
calendar -Display appointments and reminders.
cancel -Cancels a print job.
cat -View and/or modify a file.
cc -C compiler.
cd -Change directory.
chdir -Change directory.
checkeq -Language processors to assist in describing equations.
checknr -Check nroff and troff files for any errors.
chfn -Modify your own information or if super user or root modify another users information.
chgrp -Change a groups access to a file or directory.
chkey -Change the secure RPC key pair.
chmod -Change the permission of a file.
chown -Change the ownership of a file.
chsh -Change login shell.
cksum -Display and calculate a CRC for files.
clear -Clears screen.
cls -Alias often used to clear a screen.
cmp -Compare files.
col -Reverse line-feeds filter.
comm -Compare files and select or reject lines that are common.
compress -Compress files on a computer.
continue -Break out of while, for, foreach, or until loop.
copy -Copy files.
cp -Copy files.
cpio -Creates archived CPIO files.
crontab -Create and list files that you wish to run on a regular schedule.
csh -Execute the C shell command interpreter
csplit -Split files based on context.
ctags -Create a tag file for use with ex and vi.
cu -Calls or connects to another UNIX system, terminal or non-UNIX system.
cut -Cut out selected fields of each line of a file.
date -Tells you the date and time in UNIX.
dc -An arbitrary precision arithmetic package.
df -Display the available disk space for each mount.
deroff -Removes nroff/troff, tbl, and eqn constructs.
diff -Displays two files and prints the lines that are different.
dircmp -Lists the different files when comparing directories.
dpost -Translates files created by troff into PostScript.
du -Tells you how much space a file occupies.
echo -Displays text after echo to the terminal.
ed -Line oriented file editor.
edit -Text editor.
egrep -Search a file for a pattern using full regular expressions.
elm -Program command used to send and receive e-mail.
emacs -Text editor.
enable -Enables / Disables LP printers.
env -Displays environment variables.
eqn -Language processors to assist in describing equations.
ex -Line-editor mode of the vi text editor.
exit -Exit from a program, shell or log you out of a UNIX network.
expand -Expand copies of file s.
expr -Evaluate arguments as an expression.
fc -The FC utility lists or edits and re-executes, commands previously entered to an -interactive sh.
fg -Continues a stopped job by running it in the foreground
fgrep -Search a file for a fixed-character string.
file -Tells you if the object you are looking at is a file or if it is a directory.
find -Finds one or more files assuming that you know their approximate filenames.
finger -Lists information about the user.
fmt -Simple text formatters.
fold -Filter for folding lines.
for -Shell built-in functions to repeatedly execute action(s) for a selected number of times.
foreach -Shell built-in functions to repeatedly execute action(s) for a selected number of times
ftp -Enables ftp access to another terminal.
getfacl -Display discretionary file information.
gprof -The gprof utility produces an execution profile of a program.
grep -Finds text within a file.
groupadd -Creates a new group account.
groupdel -Enables a super user or root to remove a group.
groupmod -Enables a super user or root to modify a group.
gunzip -Expand compressed files.
gview -A programmers text editor.
gvim -A programmers text editor.
gzip -Compress files.
halt -Stop the computer.
hash -Remove internal hash table.
hashstat -Display the hash stats.
head -Displays the first ten lines of a file, unless otherwise stated.
help -If computer has online help documentation installed this command will display it.
history -Display the history of commands typed.
hostname -Set or print name of current host system.
id -Shows you the numeric user and group ID on BSD.
ifconfig -Sets up network interfaces.
isalist -Display the native instruction sets executable on this platform.
jobs -List the jobs currently running in the background.
join -Joins command forms together.
keylogin -Decrypt the user's secret key.
kill -Cancels a job.
ksh -Korn shell command interpreter.
ld -Link-editor for object files.
ldd -List dynamic dependencies of executable files or shared objects.
less -Opposite of the more command.
lex -Generate programs for lexical tasks.
ln -Creates a link to a file.
lo -Allows you to exit from a program, shell or log you out of a UNIX network.
locate List files in databases that match a pattern.
login -Signs into a new system.
logname -Returns users login name.
logout -Logs out of a system.
lp -Prints a file on System V systems.
lpadmin -Configure the LP print service.
lpc -Line printer control program.
lpq -Lists the status of all the available printers.
lpr -Submits print requests.
lprm -Removes print requests from the print queue.
lpstat -Lists status of the LP print services.
ls -Lists the contents of a directory.
mach -Display the processor type of the current host.
mail -One of the ways that allows you to read/send E-Mail.
mailcompat -Provide SunOS 4.x compatibility for the Solaris mailbox format.
mailx -Mail interactive message processing system.
make -Executes a list of shell commands associated with each target.
man -Display a manual of a command.
mesg -Control if non-root users can send text messages to you.
mkdir -Create a directory.
more -Displays text one screen at a time.
mount -Disconnects a file systems and remote resources.
mt -Magnetic tape control.
mv -Renames a file or moves it from one directory to another directory.
neqn -Language processors to assist in describing equations.
netstat -Shows network status.
newalias -Install new elm aliases for user and/or system.
newform -Change the format of a text file.
newgrp -Log into a new group.
nice -Invokes a command with an altered scheduling priority.
niscat -Display NIS+ tables and objects.
nischmod -Change access rights on a NIS+ object.
nischown -Change the owner of a NIS+ object.
nischttl -Change the time to live value of a NIS+ object.
nisdefaults -Display NIS+ default values.
nisgrep -Utilities for searching NIS+ tables.
nismatch -Utilities for searching NIS+ tables.
nispasswd -Change NIS+ password information.
nistbladm -NIS+ table administration command.
nohup -Runs a command even if the session is disconnected or the user logs out.
nroff -Formats documents for display or line-printer.
nslookup -Queries a name server for a host or domain lookup.
on -Execute a command on a remote system, but with the local environment.
onintr -Shell built-in functions to respond to (hardware) signals.
optisa -Determine which variant instruction set is optimal to use.
pack -Shrinks file into a compressed file.
pagesize -Display the size of a page of memory in bytes, as returned by getpagesize.
passwd -Allows you to change your password.
paste -Merge corresponding or subsequent lines of files.
pax -Read / write and writes lists of the members of archive files and copy directory hierarchies.
pcat -Compresses file.
perl -Perl is a programming language optimized for scanning arbitrary text files, extracting information from those text files.
pg -Files perusal filters for CRTs.
pgrep -Examine the active processes on the system and reports the process IDs of the processes
pico -Simple and very easy to use text editor in the style of the Pine Composer.
ping -Sends ICMP ECHO_REQUEST packets to network hosts.
pkill -Examine the active processes on the system and reports the process IDs of the processes
poweroff -Stop the computer.
pr -Formats a file to make it look better when printed.
priocntl -Display's or set scheduling parameters of specified process(es)
printf -Write formatted output.
ps -Reports the process status.
pvs -Display the internal version information of dynamic objects within an ELF file.
pwd -Print the current working directory.
quit -Allows you to exit from a program, shell or log you out of a UNIX network.
rcp -Copies files from one computer to another computer.
reboot -Stop the computer.
red -Line oriented file editor.
rehash -Recomputes the internal hash table of the contents of directories listed in the path.
remsh -Runs a command on another computer.
repeat -Shell built-in functions to repeatedly execute action(s) for a selected number of times.
rgview -A programmers text editor.
rgvim -A programmers text editor.
rlogin -Establish a remote connection from your terminal to a remote machine.
rm -Deletes a file without confirmation (by default).
rmail -One of the ways that allows you to read/send E-Mail.
rmdir -Deletes a directory.
rn -Reads newsgroups.
rpcinfo -Report RPC information.
rsh -Runs a command on another computer.
rview -A programmers text editor.
rvim -A programmers text editor.
s2p -Convert a sed script into a Perl script.
sag -Graphically displays the system activity data stored in a binary data file by a previous sar run.
sar -Displays the activity for the CPU.
script -Records everything printed on your screen.
sdiff -Compares two files, side-by-side.
sed -Allows you to use pre-recorded commands to make changes to text.
sendmail -Sends mail over the internet.
set -Set the value of an environment variable.
setenv -Set the value of an environment variable.
setfacl -Modify the Access Control List (ACL) for a file or files.
settime -Change file access and modification time.
sh -Runs or processes jobs through the Bourne shell.
shutdown -Turn off the computer immediately or at a specified time.
sleep -Waits a x amount of seconds.
sort -Sorts the lines in a text file.
spell -Looks through a text file and reports any words that it finds in the text file that are not in the dictionary.
split -Split a file into pieces.
stop -Control process execution.
stty -Sets options for your terminal.
su -Become super user or another user.
sysinfo -Get and set system information strings.
tabs -Set tabs on a terminal.
tail -Delivers the last part of the file.
talk -Talk with other logged in users.
tar -Create tape archives and add or extract files.
tbl -Preprocessor for formatting tables for nroff or troff.
tcopy -Copy a magnetic tape.
tee -Read from an input and write to a standard output or file.
telnet -Uses the telnet protocol to connect to another remote computer.
time -Used to time a simple command.
timex -The timex command times a command; reports process data and system activity
touch -Change file access and modification time.
tput -Initialize a terminal or query terminfo database.
tr -Translate characters.
traceroute -Print the route packets take to network host.
troff -Typeset or format documents.
ul -Reads the named filenames or terminal and does underlining.
umask -Get or set the file mode creation mask.
unalias -Remove an alias.
unhash -Remove internal hash table.
uname -Print name of current system.
uncompress -Uncompressed compressed files.
uniq -Report or filter out repeated lines in a file.
unmount -Crates a file systems and remote resources.
unpack -Expands a compressed file.
untar -Create tape archives and add or extract files.
until -Execute a set of actions while/until conditions are evaluated TRUE.
useradd -Create a new user or updates default new user information.
userdel -Remove a users account.
usermod -Modify a users account.
vacation -Reply to mail automatically.
vedit -Screen-oriented (visual) display editor based on ex.
vgrind -Grind nice program listings
vi -Screen-oriented (visual) display editor based on ex.
vim -A programmers text editor.
view -A programmers text editor.
wait -Await process completion.
wc -Displays a count of lines, words, and characters in a file
whereis Locate a binary, source, and manual page files for a command.
while -Repetitively execute a set of actions while/until conditions are evaluated TRUE.
which -Locate a command.
who -Displays who is on the system.
whois -Internet user name directory service.
write -Send a message to another user.
X -Execute the X windows system.
xfd -Display all the characters in an X font.
xlsfonts -Server font list displayer for X.
xset -User preference utility for X.
xterm -Terminal emulator for X.
xrdb -X server resource database utility.
yacc -Short for yet another compiler-compiler, yacc is a compiler.
yppasswd Changes network password in the NIS database.
zcat -Compress files.

source:computerhope.com

Monday, November 20, 2006

Thursday, November 16, 2006

hi............................