Revision Questions (and Student Answers)

OSF Review Questions

Questions: Last updated on 29 May 2010

Answers: Continuously evolving.

I am glad several of you have used this wiki wisely and contributed. A few have abused the freedom I gave you all to edit the wiki - I like to see these people grow up and take some responsibility. Good Luck in the exam. - Ganeshan

BEST OF LUCK GUYS/GIRLS WE ALL NEED IT!!!!!! we have no idea whats going to happen that's GUTTERING :-(

This is really annoying, last semester they didn't even have an exam. What's also annoying about this is that this is the only paper where we have no idea how the exam is set up, we are literally going in blind and its really stupid, I hate being the test dummy

yes i agree. not keen at all for this exam haha, we covered all of this in the last exam I don't know why they must include all the same stuff again.

Lol dude, i think i might fail.
Changed my mind, i dont think anymore, i know im gnna fail. :(
.Guys it's sooo cute you all know how to insert a comment in here but did you answer at least a question. Get the bloody answers n study and if you wanna complain this is not the right place anyway.


Is anyone able to add the Win 7 main/new features? I still don't know what this question requires………!!

Is anyone working on the answers? I've been working here over the last 2 days and i cannot see anyone adding anything. Don't be to lazy to put the answers up please. We need to collaborate to be able to pass.
.** Lol yeah, seems like this Wiki is in a stand-still. Might see some activity Sunday Night**

Does anyone know the answers for any Linux commands below. I've tried some and it didn't work. Please help!!! The answers I have I already put up here and still working on the rest of them. Thanks guys

To start adding/editing answers, scroll down to the end of this page and click on edit then add/edit the answers under each question.

Your lecturers will also edit and improve some of the answers as well as add some useful URLs.

Note that this site may go off-line or be corrupted accidentally or deliberately at any time.

1. What is an operating system? What are the functions of a desktop operating system?

Every computer must have an operating system to run other programs. An operating system is the software on a computer that manages the way different programs use its hardware, and regulates the ways that a user controls the computer. Operating systems are found on almost any device that contains a computer with multiple programs—from cellular phones and video game consoles to supercomputers and web servers. [Wikipedia].

The major functions of a desktop operating system are: providing an interface between the hardware and the application programs and the user, allocating and controlling resources, enabling users to install and use other programs such as games, enabling users to add device drivers such as printer and camera drivers so that these devices can be used.

2. Discuss the main features of Windows 7.

Some of the main features of windows 7 are improved Windows Search, Back-up & Restore, Improved Windows Taskbar and Jumplists, Live Thumbnail Previews from Taskbar and touch screen capability.

How about this:

- Home Group - allows sharing files on a home network
- Jump Lists - speedy access to your favorite pictures, songs, websites, and documents
- Snap - a quick (and fun!) new way to resize and compare windows on your desktop
- Windows Search - find virtually anything on your PC, instantly.
- Windows Taskbar - better thumbnail previews, easier-to-see icons, and more ways to customize

Thanks, those answers are nice. Are they new features, or main features though? This question still bugs me. - Some are new some improved i guess. LOL I don't think the question will be in the exam paper anyway. It's not a serious one LOL Ganeshan, where are you? Please comment on the answer for this question.
This answer can be improved.

3. Discuss operating systems used in embedded systems. How do they differ from desktop operating systems?

Embedded systems are computer systems designed to perform one or a few dedicated functions often with real-time computing constraints. The operating system and application software are all embedded as part of a complete hardware device, such as the systems used to control washing machines and cell phones.

Operating systems used in embedded systems differ from desktop operating systems in a number of ways.

OS used in embedded systems OS used in desktop computers
single purpose (ie. control one device) multi-purpose
small often very large
usually a single program often many programs working together
limited functionality, incapable of handling additional devices can handle new devices such as printers and cameras using appropriate device drivers
often bundled together with the application program separate from the application program
often installed on a EEPROM or similar device at the time of manufacture often installed from a DVD etc to the hard drive
not very flexible flexible usage

4. What are sensor nodes? How are they used in the real world? Do they have any operating systems, and if they do, how big are these operating systems?

A sensor node is a node, in a wired or wireless sensor network, that is capable of gathering sensory information such as temperature or heart rate, processing this information and communicating with other connected nodes in the network.

In the real world, sensor nodes and networks (wired and wireless) are used to detect fires, floods, enemy movement on the battlefield etc.

Yes, they use very small operating systems such as the TinyOS.

5. What are real time operating systems? Explain the difference between hard and soft real time operating systems.

A real-time operating system is an operating system that guarantees a certain response within a specified time constraint. A real time system may be one where its application can be considered (within context) to be mission critical. The anti-lock brakes on a car are a simple example of a real-time computing system — the real-time constraint in this system is the short time in which the brakes must be released to prevent the wheel from locking. Real-time computations can be said to have failed if they are not completed before their deadline, where their deadline is relative to an event. A real-time deadline must be met, regardless of system load [Wikipedia].

In a hard real-time system, the completion of an operation after its deadline is considered useless - ultimately, this may cause a critical failure of the complete system. A soft real-time system on the other hand will tolerate such lateness, and may respond with decreased service quality (e.g., omitting frames while displaying a video) [Wikipedia].

A car engine control system is a hard real-time system because a delayed signal may cause engine failure or damage. Other examples of hard real-time embedded systems include medical systems such as heart pacemakers and industrial process controllers [Wikipedia].

6. Discuss time-sharing as applied in operating systems.

Time sharing is when the CPU shares its time between all processes. The CPU prioritises the processes and allows more of its use for higher prioritized processes. This can be viewed using the task manager in windows OS’s. This answer can be improved.


Wikipedia: Time-sharing is the sharing a computing resource among many users by means of multiprogramming and multi-tasking.

7. What is BIOS? Describe its use in a computer. How can the BIOS on a notebook computer be updated?

BIOS stands for Basic Input Output System. BIOS is boot firmware designed to be the first code to run when the PC is powered on. The initial function of the BIOS is to identify, test and initialize system devices such as the HDD, FDD, and other hardware. BIOS firmware can be updated via a process known as flashing. Some motherboard BIOS can be updated by executing a program from the OS level after booting from the HDD. In other cases, the system must be booted from a FDD, CD or USB thumb drive (using software supplied by the system or motherboard vendor).

8. Briefly describe layered, micro-kernel and virtual-machine architectures of operating systems.
layer 1 - memory management
layer 2 - communication
layer 3 - memory I/O
layer 4 - user program
layer 5 - system operation

OS modules form different layers and can only communicate with the one above and below. Each layer uses the layer below to operate the function. Can be improved.

The micro-kernel provides the mechanisms needed to implement an OS. Can be improved, perhaps also include a diagram.

Starting from the bottom of the logical stack, the host operating system manages the physical computer. The Virtual Machine Monitor (VMM) virtualization layer manages virtual machines, providing the software infrastructure for hardware emulation. Each virtual machine consists of a set of virtualized devices.
All virtual machines run within a single process. Each virtual processor runs on its own thread. All software code running within the virtual machine runs in a separate VMM context. This context consists of an address space that is completely separate from any Windows process, or from any other virtual machine. In this sense, the architecture is stronger than a simple per-process design.
Finally, the guest operating system and applications run on the virtual machine as if they were running on physical hardware, rather than emulated hardware. When a guest operating system is running, the special-purpose VMM kernel manages the CPU and hardware during virtual machine operations, creating an isolated environment in which the guest operating system and applications run close to the hardware at the highest possible performance.


9. What is version control? Describe its usage.

In wikis, revision control allows for the ability to revert a page to a previous revision, which is critical for allowing editors to track each others edits, correct mistakes and defend public wikis against vandalism and spam. This answer can be improved. Also, need to talk about version control in general, not just in wikis

A version control system (also known as a Revision Control System) is a repository of files, often the files for the source code of computer programs, with monitored access. Every change made to the source is tracked, along with who made the change, why they made it, and references to problems fixed, or enhancements introduced, by the change.
Users may wish to compare today's version of some software with yesterday's version or last year's version. Since version control systems keep track of every version of the software, this becomes a straightforward task. Knowing the what, who, and when of changes will help with comparing the performance of particular versions, working out when bugs were introduced (or fixed), and so on. Any problems that arose from a change can then be followed up by an examination of who made the change and the reasons they gave for making the change //


10. Discuss the advantages and disadvantages of virtualization. What is bare metal virtualisation? What is hosted virtualisation? What is the differences between Type 1 and Type 2 hypervisors? Which one of these is also called bare-metal?

Virtualization allows multiple operating system instances to run concurrently on a single computer; it is a means of separating hardware from a single operating system. Each “guest” OS is managed by a Virtual Machine Monitor (VMM), also known as a hypervisor. Because the virtualization system sits between the guest and the hardware, it can control the guests’ use of CPU, memory, and storage, even allowing a guest OS to migrate from one machine to another.
The advantage of virtualization is that users are able to access other computers remotely, meaning they don’t have to physically be at the computer in question in order to access the information from it. On the other hand, the disadvantage of virtualization is that all VMs have to be compatible with your running kernel. In other words, you can't run Windows operating systems, Solaris, Mac OS X, or any other operating system that couldn't run your system's kernel on its own this is that you cannot insert CDs DVDs nor do physical changes to the computer in question from the user’s remote location.
Virtual machine monitors or hypervisors allow multiple operating systems to run concurrently on a host computer. This answer can be improved.
Type 1 or bare-metal hypervisors run directly on the host’s hardware to control the hardware and to monitor guest OS’s. A guest operating system thus runs on another level above the hypervisor.
Type 2 or hosted hypervisors run within a conventional OS environment. With the hypervisor layer as a distinct second software level, guest OS’s run at the third level above the hardware.


11. What is a computer program? What is a process? How would you list the processes running in Windows systems? How do you terminate a process in Windows?

A Computer Program is series/sequence of instructions that directs computer to perform tasks.
A Process is a program in execution or a unit of work in computer system.

CTRL + ALT + DELETE – to list all the processes

Click on the process you want to terminate to highlight it and then click the button “End process”

12. What is multi-tasking? Explain different types of multi-tasking.

Multitasking – running multiple programs at the same time.

Cooperative multitasking – A process currently controlling the CPU must offer control to other processes; all programs must cooperate for the process to work.
Pre-emptive multitasking – With pre-emptive multitasking, the OS interrupts a program that is executing and passes control to another program waiting to be executed. OS regains control if one program stops operating properly.

13. What is multi-processing?

Multiprocessing – 2 or more processors running programs at the same time.

14. Explain inter-process communication. Can inter-process communication take place between processes running on separate machines using different operating systems?

Inter-process communication – when processes communicate with each other. The inter-process communication can take place between processes running on separate machines using different operating systems; therefore some mediators (protocols) are needed.

15. Describe the usage of API and system calls in operating systems.

The Windows API is the core set of application programming interfaces available in the windows operating systems, which are used instead of programmers having to write out lots of code, System calls are the way a process requests a service from the operating systems kernel. A system call is a request for the operating system to perform certain tasks. The system calls provide the interface between the processes and the operating system.

16. Discuss CPU scheduling.

CPU scheduling is the process of assigning the way processes are to be run on the CPU. The CPU scheduler places each process into a queue and each process is assigned a place in the queue on a first come first serve basis. The processes are then given control of the CPU one by one till they have all finished. The CPU scheduler can also place processes in the queue where it wants depending on the importance of the process. This answer needs to be expanded and refined. Use the URL given.

17. How is the class library in the .net framework used by programmers to produce software applications?

The .NET Framework class library is a library of classes, interfaces, and value types that provides access to system functionality and is designed to be the foundation on which .NET Framework applications, components, and controls are built. [Microsoft] This answer needs to be expanded and refined. Use the URL given.

18. With the help of a diagram, explain how code written in programming languages such as C#, VB.NET and J# are converted to machine code.

Programming language (C#, VB.NET, J# etc) -> compiler -> common intermediate language -> common language runtime -> machine code(binary 00011001) Refer to the diagram used during the semester - this diagram I believe is in the Powerpoint slides on Moodle. Week 3 btw - can we please have the source of the diagram.It's not readable at all. I wonder why we never saw the diagram in the class and how come that the slides are updated afterwards?

19. Discuss the usage of the Global Assembly Cache.

The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer. The GAC allows a program to use multiple versions of itself in its runtime because sometimes the program needs to specifically use different versions. This answer needs to be expanded and refined. Use the URL given.

20. Discuss Message Queues.

A message queue is used for inter process communication. Message Queues provide an asynchronous communications protocol, meaning that the sender and receiver of the message do not need to interact with the message queue at the same time. When a message is sent it is saved into the message queue until the message is picked up by the receiver. More information on the URL given, especially the first two paragraphs.

21. Why is it necessary to manage the memory in a computer system? How does an operating system manage memory? What is virtual memory?

Without memory, it is impossible for the computer to run. The operating system is responsible for managing the
memory space allocated to each application and, where relevant, to each user. If there is insufficient physical
memory, the operating system can create a memory zone on the hard drive, known as “virtual memory”. Virtual
memory allows you to run applications requiring more memory than there is available RAM on the system. However,
this memory is a low slower! This answer can be improved.

22. What is segmentation? What is paging? What are page frames? Discuss real memory space and address space and the relationship between these two.

Memory segmentation is the process of dividing the computer memory into different overlapping segments. Paging
refers to the operating system retrieving data from secondary storage in same-size blocks called pages. The main
functions of paging are performed when a program tries to access pages that are not currently mapped to physical
memory (RAM). Page frames are the structure these pages are stored in.

I don’t know what to write for the second part of that question.. But I did find out that “In computing, an
address space defines a range of discrete addresses, each of which may correspond to a physical or virtual
memory register, a network host, peripheral device, disk sector, or other logical or physical entity.” -
What ever that means. This answer can be improved.

23. Explain the difference between a journaling file system and a non-journaling file system. Why do modern operating systems employ journaling file systems?

A journaling file system is a file system that keeps track of the changes it intends to make in a journal
before committing them to the main file system. In the event of a system crash or power failure, such file
systems are quicker to bring back online and less likely to become corrupted. In a non-journaled file system,
detecting and recovering from such inconsistencies requires a complete walk of its data structures. This can
take a long time if the file system is large and if there is relatively little I/O bandwidth.[Morne]

24. Name the two file systems used by Windows. Which of these is better and why?

FAT32 – File Allocation Table

NTFS – New Technology File System
- improved support for metadata
- advanced data structures
- security access control lists (ACL)
- Very fast access!!!

This answer can be improved.

25. What is I/O management? How is I/O management performed in Windows?

The I/O management subsystem controls all the input and output of the computer system. For the
enforcement of security, the most important things that the I/O management subsystem does is managing
the transfer of data, and enforcing access controls on data while it is being transferred. This answer can be improved.

26. Explain the role of device drivers and their relationship with operating systems.

• Each device connected to the computer needs device specific code for controlling – device driver written by device manufacturer and delivered along with the device
• Each OS needs its own device driver for each device

27. Why do we often partition hard disks? How would you partition a disk drive? What tools would you use?

- To run multiple OSs on an HDD
- To create a new storage for backups

Backup all the data and drivers first! Computer Manager - Disk Management – Click on unallocated partition – Create new partition.
You can also partition HDD when installing or reinstalling the OS.

There is a several partitioning tools available, e.g.
- Partition Magic
- Gnome Partition Editor
- Linux Partition

28. Discuss the functions of the Windows registry. What information is held in it? Who or what uses the information held in the registry?

The Windows Registry is a hierarchical database that stores configuration settings and options on Microsoft Windows operating systems.

29. Can the Backup and Restore Centre do full system backups? What other backup(s) can it do? What is the major improvement in the Backup and Restore Centre compared with NTBackup?

Wikipedia: There are two different types of backup supported: File Backup and Full System Backup.
Newer backup media such as CD, DVD and Blu-ray discs are supported and all backup operations are based on the Volume Shadow Copy service.
The Volume Snapshot Service also creates and maintains periodic copies of system and user data on the same local volume although this backup feature of the OS is not exposed as part of the Backup and Restore Centre.

30. What is Volume Snapshot Service?

Volume Snapshot Service (VSS) is a feature that allows taking a "snapshot" of a file or folder on a volume. This is used in Windows to allow backing up of files even though they are in use. The snapshot service creates a read-only "snapshot" of the volume, and allows applications to access that snapshot without having to deal with any file locking issues.

31. Discuss malware, spyware and adware.

Malware is short for “Malicious Software” and is designed to infiltrate computers without the user's consent. Spyware and Adware are both forms of Malware, but they are different.
Spyware is software that installs itself and collects small bits of information at a time.
Adware is software that automatically plays, displays or download advertisements. Some adware is also spyware. This answer can be improved.

32. Discuss some measures available to protect your home computer from malicious software.

There are many ways to protect yourself from malicious software. One of the simplest ways is to be careful about the websites you visit and download from. There are also many different pieces of software around, such as Firewalls, AntiVirus software and other similar things. One other way to protect yourself from malicious software is to use a secure browser such as Mozilla Firefox, Safari, Opera or Google Chrome. Google Chrome uses a feature called a “Sandbox” for added security.
This answer can be improved.

33. Discuss internationalisation and localisation.

Internationalisation is where a piece of software is made available to a large number of countries with different languages. Localisation is the opposite, it is where a piece of
software is changed so that it is only made for one country. This makes it smaller and easier to use in the country for which it is designed.
This answer can be improved.

34. Discuss the use of some Windows admin tools that can help with tasks such as disk, computer and network management.

Windows uses a variety of tools to manage different aspects of the operating system and hardware. There is a control panel, which controls most of the settings and management of the computer. There is also a “Disk Manager” that can be used to partition, change and format the hard drive. There are also Wizards and other interfaces to configure Networks.
This answer can be improved.

Computer Management is a collection of Windows administrative tools that you can use to manage a local or remote computer. The tools are organized into a single console, which makes it easy to view administrative properties and to gain access to the tools that are necessary to perform your computer-management tasks.

Disk Management snap-in under Computer Mangement, just as the name Disk Management implies it's a tool used to manage system disks, both local and remote.

1) Create partitions, logical drives, and volumes.

2) Delete partitions, logical drives, and volumes.

3) Format partitions and volumes.

4) Mark partitions as active.

5) Assign or modify drive letters for hard disk volumes, removable disk drives, and CD-ROM drives.

6) Obtain a quick visual overview of the properties of all disks and volumes in the system.

7) Create mounted drives on systems using the NTFS file system.

8) Convert basic disks to dynamic disks.

9) Convert dynamic to basic disks, although this is a destructive operation.

10) On dynamic disks, create a number of specialty volumes including spanned, striped, mirrored, and RAID-5 volumes.

Another section under computer management is System Tools which enables to manage local or remote PC. Some functions are

* Event Viewer

Use the Event Viewer tool to manage and view events that are recorded in the Application, Security, and System logs. You can monitor the logs to track security events and to identify possible software, hardware, and system problems.

* Shared Folders

Use the Shared Folders tool to view connections and resource in use on the computer. You can create, view, and manage shares, view open files and sessions, and close files and disconnect sessions.

* Local Users and Groups

Use the Local Users and Groups tool to create and manage your local user accounts and groups. Local Users and Groups is available only in Windows XP Professional.

* Performance Logs and Alerts

Use the Performance Logs and Alerts tool to configure performance logs and alerts to monitor and collect data about your computer's performance.

* Device Manager

Use Device Manager to view the hardware devices installed in your computer, update device drivers, modify hardware settings, and troubleshoot device conflicts.

Another tool under admin tools is DNS snap in.

DNS snap in allows you to configure and authorize DNS servers on your network. DNS snap in can conncet to multiple DNS srevers providing central graphical user interface to network admins to manage multiple DNS zones

35. List and discuss some of the information that can be obtained from the task manager.

In the task manager, it shows many different things. It shows the programs that are running, when you switch to the process pane, it shows all processes running and how much memory and cpu they are using.
This answer can be improved.

36. List three MS Windows commands and discuss their functions.


The HELP command, when executed without any arguments, displays a list of available commands.
Usage: HELP

The HELP command, when executed with a valid command as an argument, provides information on how the command may be used.

The COPY command is used to copy one or more files. Several options may be used with the COPY command. For example, the /Y option suppresses asking for confirmation that you want to overwrite an existing destination file with the same name.
eg. COPY C:\abc\file.txt D:\xyz\file.txt

The DIR command displays a list of files and subdirectories in a directory. This command also has several options.
dir - displays a list of files and subdirectories.
dir/w - displays a list of files and subdirectories in wide format.
dir /p - displays a list of files and subdirectories, one screenful at a time.

37. What will the command dir /w display? Specify the exact purpose of the /w option. List two other options used with the dir command and state how these modify the output of the dir command.

DIR /W – uses the wide listing format and does not display date, time and specification. By displaying only the file names in more than one coloumn, more filenames can be listed in one screen.

DIR /P – pauses after each screenful of information.

DIR /B – uses bare format (ie. no heading or summery).

38. Write a batch file that will display the directory contents and then start the task manager (taskmgr.exe).

start taskmgr

39. What is a root directory?

Root directory - is the top directory in a directory hierarchy.

40. What is an absolute path?

An absolute path or full path - is a unique location of a file or directory name that usually starts with the root directory. Directories and subdirectories listed are usually separated by a slash.

Wikipedia: A Full Path or Absolute Path is a path that points to the same location on one file system regardless of the working directory or combined paths. It is usually written in reference to a root directory.

Example: cd/etc/bin/app

41. What is a relative path?

Wikipedia: A Relative Path is a path relative to the working directory of the user or application, so the full absolute path may not need to be given.

Example: cd/../../etc/bin/app

42. How do I delete a file in Linux?

rm Filename

43. How would you delete a directory in Linux?

rm –r DirectoryName - will ask you to remove every single file in the directory separately
rm –rf DirectoryName - will delete the entire directory even if it is not empty

44. Add a user with username peter_pan and then set peter_pan's password to magic.

useradd peter_pan
passwd peter_pan

45. Add a user with username obama, full name Barack Hussein Obama, group usa, login shell /bin/sh, userid 888 and home directory /home/liveuser.

46. Add a group named usa.

groupadd usa

47. Use cat /etc/passwd | grep tom to view the lines containing the word tom in the file. Guess any possible use for this command line?

Will find the lines containing tom

May be used to check if a user with username tom exists.

48. Discuss file permissions in Linux. What do the r, w and x in rwx stand for?

Linux separates users into three groups, user (owner), group (the group to which the user belongs) and others (all users on the system, excluding owner and his group)

There are three levels of access, read, write and execute.

The ls -l command will display the file permissions for each regular file something like,

-rwxrwxrwx ………

The first set of rwx stands for the permissions for the owner, the second set for his/her group and the third set for others.

If any of these letters are replaced by a - then that person or group will not have the corresponding access. For example in -rwxrwx-wx, the others do not have read permission, ie. they cannot read (view) the contents of the file.

File permissions may be changed using the chmod command.

49. What command would you use to copy the file /home/tom/games/avatar.ind to the directory /home/sue/games/3D, using absolute pathnames?

cp /home/tom/games/avatar.ind /home/sue/games/3D

50. What will the pwd command do?

Display the absolute path of current directory. I think the official version is print working directory - use man pwd to find your own answer. You think or you know???

PWD - displays the name of the current working directory - that's what the MAN PWD says :-)

51. What will the pwd > file1 command do?

52. What will the history command do?

Displays all the commands used in the past

53. What will the history > file1 command do?
54. What will the ls -l command do?
55. What will the ls -l » file1 command do?
56. Assuming your current directory to be /home/tom what command would you use to move the file /home/tom/games/doom to the directory /home/sue/games/archive, using relative pathnames?

mv games/doom ../sue/games/archive

57. What is the general format of Linux commands?

Command <options> arguments

58. Give examples of the use of Linux commands with options and arguments.

cp –r /home/tom /home/sue

** Give at least one more example.**

59. What will ls -l ; date display?

This command line will display the current directory listing in long format and then display the current date.

60. What will lsss -l ; date display?

This command line has lsss which is not a valid command. It will output something like "Command not found" and then display the current date.

61. What will ls -l || date display?

62. What will ls -l && date display?

63. What will lsss -l || date display?

64. What will lsss -l && date display?

65. What will history display?

Displays all the commands used in the past

66. What will history > file20May10 do?

The history command will output a list of commands executed by the user which is then redirected and written to file20May10. If a file with the same filename exists, it will be overwritten.

67. What will history | less do?

The history command will output a list of commands executed by the user which is then piped to the less command that will display these one page at a time. The user will be able to use the keyboard to browse these commands one page at a time.


It will display a list of commands executed by the user, one page at a time. The user will be able to browse through these commands using the keyboard.

68. How do you terminate a process in Linux?

If you are in a different shell, find the process id (PID) using the ps -A command and then kill the process using kill pid, where pid is the process ID of the process you want to kill.

If you are in the same shell, by clicking ctrl-c

69. Explain clearly three uses of the cat command.

cat filename will display the contents of an existing file.
cat > filename will create a new file with the given file name. User can the enter the information and then save it by pressing ctrl+d. Note that any existing file with the same name will be overwritten.
cat » filename is used to append new information at the end of the existing file, without overwriting any existing information.

70. List two commands you can use to view a list of the processes that are currently running in Linux and explain their usage.

ps - provides information about the currently running processes, including their process identification numbers (PIDs). The ps command can be used with a number of options. For example, the ps command on its own will list the processes started on the user's terminal, whereas the ps -A will list all the processes running on the system.

top - The top program provides a dynamic real-time view of a running system.

71. Discuss two ways of terminating ‘hung’ processes in Linux.

kill pid ; pid of the process
by pressing ctrl+c

this answer needs improvements

72. Explain the difference between commands, options and arguments.

Command: specifies what action needs to be done
Options: used to achieve additional features for that command
Arguments: parameters that are required for processing of a specific command

this answer needs improvements

A Command is an instruction given by a user telling a computer to do something, such a run a single program or a group of linked programs. Commands are generally issued by typing them in at the command line and then pressing the ENTER key, which passes them to the shell.
An Option, also referred to as a flag or a switch, is a single-letter or full word that modifies the behaviour of a command in some predetermined way. Options are distinct from arguments, which are input data provided to commands, most commonly the names of files and directories.
An Argument, also called a command line argument, is a file name or other data that is provided to a command in order for the command to use it as an input.

73. What command would you use to grant read and write permissions for the group, leaving all other permissions unchanged, to a file named myfile.txt?

chmod g+rw myfile.txt

74. Assuming your current directory to be /home/liveuser, using relative pathnames what command would you use to rename the file /home/pat/tax/estimate.cvs as /home/pat/tax/refunds.cvs?

mv ../pat/tax/estimate.cvs ../pat/tax/refunds.cvs

75. Explain the general format of Linux commands.

command <options> parameter(s)

this answer needs improvements

76. Assuming your current directory to be /home/liveuser, using relative pathnames what command would you use to delete the directory /home/tom/tax?

rm –r ../../tom/tax
“rm” for the remove function, “-r” is to remove directories, “../..” is the relative path which does not have to be typed out in full, ” /tom/tax” is the non-relative path which has to be typed out in full.

77. Explain the relationship between applications, processes and threads. What two commands can you use to view the processes in Linux?

Applications are built-up of many processes, processes process information in the form of threads which are executed by the CPU.

78. Write the complete command you would use to add a user with username “Paul”, home directory “/home/guests” and login shell, “/bin/ksh”.

maybe this code????

Useradd –h /home/guests –s /bin/ksh paul
“-h” to change the home directory, “-s” to change the shell with the username on the end

Is this right: useradd paul - c “Paul” - d “/home/guests” - s “/bin/ksh” ?

79. If you are logged in as user tom what command would you use to switch to user root in Fedora 12? What would you do stop using the root user account and switch back to being user tom?

su - (substitute user) changes a login session's owner without the owner having to first log out of that session
su liveuser – changes back to a session’s owner

80. Assuming you are logged in as pat and you are in /home/pat directory, what single command would you use to create the directories /home/pat/letters and /home/pat/letters/tom using absolute pathnames?

mkdir letters letters/tom
“mkdir” for the make directory function, “letters” to initially make the first letters directory, ”letters/tom” to make the tom directory in letters.

bold text
81. What is the purpose of the pwd command? What information is held in each of the seven fields of the /etc/passwd file?

pwd prints the name of current working directory

/etc/passwd displays following: username, encrypted password, user ID, group ID, comment, home directory, login shell

82. What will the following command output? cat /etc/passwd | grep tom

The command above displays following: username, encrypted password, user ID, group ID, comment, home directory, login shell

83. Write a bash shell script ( that will read user names provided as a list in a text file (userlist.txt) and create accounts for these users on a Linux system.

84. Discuss the use of the tar command.

tar - converts a group of files into an archive.

85a. and b. Try the following shell scripts on the lab server and ensure you understand how these work. Ensure you are able to write similar scripts.


echo $count

echo $total

while test $total -le 1000
echo "Please enter a number"
read number
total=`expr $total + $number`
count=`expr $count + 1`
echo You entered $count numbers and their total is $total


cat "$1" | while read uname fname

useradd -c "$fname" "$uname"

if [ $? -eq 0 ];

echo "An account created for $fname with username $uname"

  1. else

# echo "Problem creating an account - check your input file"


86. What is a batch file? Describe the steps involved in writing and executing a batch file. Give an example of a Linux shell script and explain what it is expected to do when executed.

Answers for questions 1 -15

1. What is an operating system? What are the functions of a desktop operating system?
Operating systems are software that governs hardware. Desktop operating system refers to the software installed on the hard drive of a desktop computer that runs the hardware components and provides a graphical user interface (GUI); it interfaces between the user, the hardware and software applications.

2. Discuss the main features of windows 7.
The main features of Windows 7 are its ability to support 64bit CPU’s, touch screens and improved search capabilities.

3. Discuss operating systems used in embedded systems. How do they differ from desktop systems?
Operating systems in embedded systems contain the information for proper functioning of the equipment it is installed on, examples are CD/DVD players and microwaves, and they aren’t installed or altered by the user.

4. What are sensor nodes? How are they used in the real world? Do they have any operating systems, and if they do, how big are these operating systems?
Sensor nodes are small computers chips such as CPU, RAM and ROM chips that provide specific functions such as detecting fire, measuring temperature and are also used by the army for tracking enemy movement as they have built in radar. They use an operating system called TinyOS.

5. What are real time operating systems? Explain the difference between hard and soft real time operating systems.
Real time operating systems run time crucial machines such as on production lines some are hard dead line, meaning that if the task isn’t done at the right time there could be damage as a result. Others are soft real time systems that might alarm but not cause any damage.

6. By allowing a large number of users to interact concurrently with a single computer, time-sharing dramatically lowers the cost of providing computing capability, it creates the possibility for individuals and organizations to use a computer without owning one, and promotes the interactive use of computers and the development of new interactive applications.

7. BIOS - Basic Input output System - Used to assist in the start up of an OS on a computer's storage device/s. Some motherboards can be updated by executing a program from the operating system level after booting from the hard disk. In other cases the system must be booted from a floppy disk; CD or USB thumb drive.

8. Layered - Layer 0 – processor allocation, process switching, interrupt, timer
– Layer 1 – memory management
– Layer 2 – communication
– Layer 3 – memory I/O
– Layer 4 – user program
– Layer 5 – system operation
– Inner layers more privileged
Micro kernel – Has a small Kernal (any bug in the kernel bring down the system) . Reliable.
Virtual machines – multiple servers on one machine, Single user wants multiple OS.

9. Revision control allows for the ability to revert a previous vision, which is critical for allowing editors to track each other's edits, correct mistakes, as well as fix bugs in the program, this is because usually fixing a bug or a piece of code can cause other problems.

10. Full virtualization is a virtualization technique used to provide a certain kind of virtual machine environment, namely, one that is a complete simulation of the underlying hardware. In such an environment, any software capable of execution on the raw hardware can be run in the virtual machine and, in particular, any operating systems.

11. A computer Programme is a application stored on the physical memory, A process is a program in execution e.g. the running version of the program. The process would be listed in task manager in windows, to terminate a process you go to task manager then click end process.

12. Multi Tasking is the act of multiple processes using a single processor by being scheduled when the processor will perform a task for a processor. The different types of multitasking are pre-emptive and co-operative. Co-operative multi tasking requires the process that is being executed to give control of the processor to the next process, where pre-emptive multi tasking is when a process is give a slice of time to use the CPU and the operating system always has control and can terminate a process that hangs.

13. Multi processing is when the computer uses more than one processor available, this is not multiple cores.

14. Inter-process communication is when two or more process communicate between each other sharing information, this communication occurs through message queues and mail boxes. Inter-process communication can occur between processes on other computers running different operating systems, this is achieved using protocols that must be followed for both the computers to understand the information.

15. The Windows API is the core set of application programming interfaces available in the windows operating systems, which are used instead of programmers having to write out lots of code, System calls are the way a process requests a service from the operating systems kernel. A system call is a request for the operating system to perform certain tasks. The system calls provide the interface between the processes and the operating system.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License