Question 3s Flashcards

1
Q

Consider the situation where a user downloads the source-code tarball of an application they wish to install on their linux system. Using the tar command, the user has extracted the files from the tarball into their home directory, has changed into the program directory created, and now wishes to install the application. List the steps that user must type to configure, compile and install the software on their system. For each step, provide the command prompt symbol to indicated whether an ordinary user or root should type the command.

A
$ su -
# cd ~/Downloads
# urpmi ./libglib1.2-1.2.10-24mdv2011.0.i586.rpm
# urpmi ./libgtkPLUS1.2-1.2.10-51mdv2011.0.i586.rpm
# exit
$ cd os 
$ tar -zxvf ThreadMentor-fedora4.tgz
$ rm -f ThreadMentor-fedora4.tar
               $ tar -zxvf ProducerConsumer_LikeSilberschatz.tgz 
$ PATH=$PATH:/home//os/ThreadMentor/bin
$ export PATH 
$ ./program-name
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In relation to linux, explain what a makefile is. List and briefly describe its three elements.

A

Makefile is a program building tool which runs on linux. It aids in simplifying building program executables that may need various modules.
Dependency rules - A rule consists of three parts, one or more targets, zero or more dependencies, and zero or more commands in the form
Macros - By using macros, we can avoid repeating text entries and makefile is easy to modify. Macro definitions have the form
Suffix rules - A way to define default rules or implicit rules that make can use to build a program. There are double-suffix and single-suffix. • Suffix rules are obsolete and are supported for compatibility. Use pattern rules (a rule contains character ‘%’) if possible.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Explain the concept of multi-threaded processes, and how they differ from single-threaded processes

A

Multi-threaded processes allow the execution of multiple parts of a program at the same time. These are lightweight processes available within the process. Single threaded process contain the execution of instructions in a single sequence .

The multi-threaded processes can be implemented at user level or kernel levels.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly