The 3 L's Flashcards
1
Q
What are libraries?
A
They are ready-compiled and tested programs that can be run when needed.
2
Q
Advantages of Libraries
A
Any 2 of:
- Quick and easy to use and hook into your own code
- Pre-tested, so you can be relatively sure they are already free from errors
- Pre-compiled, so they are typically optimised to run quickly
3
Q
Disadvantages of libraries
A
Any 2 of:
- Adding functionality or making specific tweaks can be difficult
- Sometimes you are “black-boxed” from the actual implementation
- You have to trust that the developers will continue to maintain the library
4
Q
What are linkers?
A
Linkers pull in libraries when needed in a process. There are 2 ways to link libraries into code. Static and Dynamic
5
Q
What is static linking?
A
All required code from libraries is directly included in the finished machine code
5
Q
What is dynamic linking?
A
- Compiled versions of libraries are stored on host computer
- Operating system links the required code from the library as the program is running
- While this cuts down the size of compiled machine code, if dynamic libraries ever change, the program may stop; it will be called in the wrong way
6
Q
What is a loader?
A
A part of the operating system that loads the executable program file (machine code) into memory, ready to run