



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Instructions Answer any FOUR questions. All questions are worth equal marks.
Examiners: Mr.G. MacSweeney Mr. J. Greenslade Mr. J. Walsh
(a) Write an interactive shell script which prompts one to enter a username and then determines whether the user has an account. ( 4 Marks )
(b) Write an interactive shell script which prompts one to enter a username and then determines whether the user is currently logged on. ( 6 Marks )
(c) Explain the purpose of the environmental variable PATH. ( 2 Marks )
(d) How would a root user set a common PATH for all users? ( 2 Marks )
The UNIX command ls –a displays a file listing – including hidden files – in the current directory.
(e) What is the purpose of hidden files? ( 2 Marks )
(f) Why are they normally hidden? ( 2 Marks )
(g) What is the purpose of the file .profile or .bash_profile located in users’ home directories? ( 2 Marks )
(h) What is the purpose of a link? ( 1 Mark )
(i) What are the differences between a hard link and a soft link? ( 4 Marks )
(a) In Linux, passwords are encrypted using a one-way encryption algorithm. Give an example of a one-way encryption algorithm. ( 2 Marks )
(b) Why can users be confident that their passwords are secure when they login? ( 3 Marks )
(c) Apart from password security, suggest another use for one-way encryption algorithms. ( 4 Marks )
(d) Why is telnet no longer regarded as a secure method of remote login? ( 2 Marks )
(e) With reference to public key encryption, explain what is meant by a public key and a private key. ( 4 Marks )
(f) Describe how two users could exchange data securely over an open network using public key encryption. ( 6 Marks )
(g) Name the remote login protocol which uses public key encryption. ( 2 Marks )
(h) Apart from public key and one-way encryption algorithms, name another type of encryption algorithm and give an example of where it might be used. ( 2 Marks )
(a) Describe the difference between a pre-emptive and a non pre-emptive scheduling algorithm. ( 2 Marks )
(b) Give one example of a pre-emptive scheduling algorithm and one example of a non pre-emptive scheduling algorithm. ( 2 Marks )
Consider the following set of processes with duration given in milliseconds.
Process Name Arrival Time Service Time P1 0 3 P2 2 6 P3 4 2 P4 5 1
(c) Draw a time line to show the execution of each of these processes for the following algorithms:
¾ Shortest Process Next ¾ Shortest Remaining Time ( 8 Marks )
(d) Calculate the Turnaround Time and Normalised Turnaround Time. ( 8 Marks )
(e) The following an edited output of the ps command on a Linux console. Explain the headings of each of the columns.
PID PPID TTY TIME CMD 6841 6832 pts/1 00:00:00 -sh 6860 6841 pts/1 00:00:00 sh 6864 6860 pts/1 00:00:00 bash 6870 6864 pts/1 00:00:00 ps –af ( 5 Marks )
(a) What is the purpose of an independent boot loader? ( 2 Marks )
(b) GRUB is an example of an independent boot loader, name another. ( 2 Marks )
Consider the following GRUB configuration file:
default= timeout= splashimage=(hd0,2)/boot/grub/splash.xpm.gz title Suse Linux 9. root (hd0,2) kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/ initrd /boot/initrd-2.4.20-8.img title Windows XP rootnoverify (hd0,0) chainloader +
(c) In what directory would you expect to find this file? ( 1 Mark )
(d) With reference to the file, what is the purpose of the first four lines? ( 4 Marks )
(e) Explain what is meant by the references (hd0,2)and(hd0,0)? ( 2 Marks )
(f) In the context of calculating disk access time, what is seek time and latency time? ( 4 Marks )
(g) With reference to disk space allocation, explain the terms internal fragmentation and external fragmentation. ( 4 Marks )
(h) With the aid of a diagram, describe the chained method of disk space allocation. State an advantage and disadvantage of the method. ( 6 Marks )