Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Discuss three advantages of dynamic (shared) linkage of libraries compared wi

ID: 3863992 • Letter: 1

Question

1. Discuss three advantages of dynamic (shared) linkage of libraries compared with static linkage.Describe two cases in which static linkage is preferable.

2. The Linux source code is freely and widely available over the Inter-net and from CD-ROM vendors. What are three implications of thisavailability for the security of the Linux system?

3. What are the advantages and disadvantages of writing an operatingsystem in a high-level language, such as C?

4. Dynamically loadable kernel modules give flexibility when drivers are added to a system, but do they have disadvantages too? Under whatcircumstances would a kernel be compiled into a single binary file, and when would it be better to keep it split into modules? Explain your answer.

5. In Linux, shared libraries perform many operations central to theoperating system. What is the advantage of keeping this functionalityout of the kernel? Are there any drawbacks? Explain your answer.

Operating Systems Questions please help!

Explanation / Answer

1. static and dynamic (shared) library linkages:

Whenever a programmer writes a code (source code) it may use other programs(libraries) generally.Linking process brings together the referenced libraries with our written code in order to execute successfully.Static and dynamic linking are the two processes of collecting and combining multiple object files in order to create a single executable.


The major benefits of shared libraries are
- the memory and disk space used by a system is less
When shared libraries are being used by all running programs,there is only one instance of each system library routine on disk, and at most one instance in physical memory. In dynamic linking only one copy of shared library is kept in memory. This significantly reduces the size of executable programs, thereby saving memory and disk space significantly. In addition, the startup time for running new programs can be reduced, since many oF the common functions needed by that program are likely to be already loaded into physical memory.

- enhance maintainability
Maintainability is another advantage of dynamic linkage. If all running programs use a shared library to access their system library routines, then upgrading those routines [examples like modifying functionality or bug fixing] can be easily accomplished by just replacing that shared library without need to recompile or relink any applications. There after the latet upgraded library will reflected and made used furhtur.

- Dynamic linking allows a program to load and unload routines at runtine of an Operating systm.
Shared libraries allow program binaries to be linked against commercial/proprietary library code without actually including any of that code in the program’s fnal executable fle. This is important because on most UNIX systems, many of the standard sharedlibraries are proprietary, and licensing issues may prevent including that code in executable fles to be distributed to third parties.

In some places, however, static linkage seems appropriate.
Programs that use statically-linked libraries are comparitively faster than those programs that uses shared libraries.
Static linking is performed by programs called linkers(aka link editors) as the last step in compiling a program.
In statically-linked programs, all code is contained in a single executable module. Hence they never run into compatibility issues.
If suppose a system administrator makes a mistake while installing any new libraries, or if hardware itself develops some sort of issue, it may result in corruption of shared libraries. As a result, often a basic set of rescue utilities are linked statically, so that there is possibility to rectify the fault without having to rely on the shared libraries.

2. An open source software is free available to public which can be used, modified and redistributed. It is absolutely free for legitimate users and also to malicious hackers. The source code can be read by bug trackers/malicious hackers. It is used by the network security industry. The open source model may have many benefits, but from a security perspective, it is hard to determine if these out-weigh the possible negatives.

The entreprise must define a security policy and evaluation period for the same before deployment and put into operation in production.
Download open source software only from trusted sites
Prefer source code to binaries wherever possible
Also keep track and monitor open source softwares/products installed and ensure they are secure and uptodate
Ultimately, security in open source needs to be looked at in the same way as traditional closed products.


3. Advantages:
- The highlevel language C facilitates the programmer to organize programs in a clear, easy, logical way.
- C is procedural oriented and features lots of libraries.
- It is easy to learn, portable (easy to install and operate) can be compiled on different platforms.
- C compiler produces machine code very fast compared to other language compiler hence good speed of compilation/execution.

Disadvantages:

-No OOPs features are supported. Hence no constructor/destructor/garbage collector/ namespace feature
-Real time checking is unavailable