Tools and Application Shell Kernel Hardware
Tools and Application Shell Kernel Hardware
SHELL or command interpreter is a mediator which interprets the command given by us then
conveys them to kernel which in turn executes them.
2. What is Kernel?
It is the heart of unix operating system. , which is an interface between shell and hardware.
3. What is Process? Explain in brief.
Any file under execution is called a process.
4. What is Operating System?
An os is a software which manages the computers hardware and provides safe environment
for running the programs.it acts as an interface between the user and the hardware.
It is loaded into the memory when computer is booted and is active till the machine is on
5. Write a short note on History of Unix
6. What are the minimum hardware requirements for installing Unix?
80 mb harddisk,4 mb ram , 16 –bit processor (80286,80386,80486) we connect the terminal
with host with 4/6/8 port controller card , which is installed on the expansion slot on the
motherboard of host m/c.
One end is connected with controller card of host m/c and other end with the serial
port of the terminal.. any dos based m/c with a serial port can act as terminal..
Out 80 mb of harddisk space 40 mbis covered by unix files and 20 mb is
used by swap files . the swap space is used when unix falls short of memory at such times
stores data temporarily o swap file .
7. Write a short note on unix file system
8. Explain the command which is used to list the all files in current directory.
Ls -l
9. Explain the features of Unix operating system.
10. Write a short note on the Different Security mechanisms available in Unix.
11. What is Terminal? Explain different types of terminals.
12. Write a short note on Unix System Organization / Unix Architecture
Unix is divided in 3 levels . the outer level consist of the application programs and the
utilities, which speak our language.
At the heart of unix is the kernel , which interact with the
hardware in m/c language.
Now the kernel and application are commununicated with each other by a shell
The shell or command interpreter is a mediator which interprets the command given by us to
the kernel which in turn executes it. The kernel has various functions like managing file,
memory, carrying data transfer between file and hardware.
Here the main idea is division of labour between two agencies i.e the kernel
an shell.
The kernel interacts with m/c’s hardware . the shell interacts with user.
13. Explain different types of shell.
14. Write a short note on unix file system.
15. Explain following commands in brief :
Mkdir,rmdir,cd,ls,cat,rm,cp,mv,wc,|
(pipe),pg,more,head,tail,echo,expr,read,file,spell,uname,tty,tput,type,path , cut ,
paste , sort , tr , grep , uniq , chmod , uname , logname , id , who , date , cal , bc.
16. Explain if statement with example.
17. Compare for loop with while loop.
SHELL SCRIPTS
1. Write a shell script to check the number is positive or negative or zero. The number must be
taken from the user at run time.
2. Write a shell script to find the greater number from the entered two numbers. Also check
whether that two numbers are equal or not. Numbers must be taken from the user at run
time.
3. Write a shell script to find the sum of n even numbers.
5. read n1
6.
8. read n2
9.
11. then
13. do
15. test=$(( $i % 2 ))
17. then
18. echo $i
19. fi
20. done
21. else
23. fi
echo”entr no”
read n
i=1
sum=0
while test $i –eq $n
do
while test $i%2 –eq 0
do
echo $i
i=`expr $i+1`
done
sum=`expr $sum +$i;
ech $sum
done
F=1
fi
done
if test $f=1
then
Echo “ is logged in “
Else
then
“not log”
fi
30. Write a shell script to print the sum of size of all files in current directory.
Create a file item.txt(ITEMNO, ITEMNAME, PURCHASEDT, ITMFORDEPT, USEDBY) with following
records:
01,MOUSE,01-01-96,IT,Raj
02,Rubber,01-03-91,Inventory,Jay
03,Notebook,09-02-97,Production,Keya
04,Paper,10-02-11,Sales,Jay
05,Pencil,12-11-09,IT,Jay
Write a shell script to show all records of item.txt. It also must print the total number of lines,
words and character of the file item.txt.
Write a shell script to search the record who is Jay in item.txt.
Write a shell script to display the name of the person for whom only one item is belonged to.
Write a shell script which will create a new file which contains only item no and item name from
item.txt. Name that new file as itm1.txt. Now perform the following tasks on the file itm1.txt.
1) Replace ‘a’ with ‘A’ and save the output in itm2.txt
2) Display only characters exists in file itm1.txt and save them in itm3.txt.
read num
i=1
fact=1
do
i=’expr $i+1‘
done