The 3 L's Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are libraries?

A

They are ready-compiled and tested programs that can be run when needed.

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

Advantages of Libraries

A

Any 2 of:

  1. Quick and easy to use and hook into your own code
  2. Pre-tested, so you can be relatively sure they are already free from errors
  3. Pre-compiled, so they are typically optimised to run quickly
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Disadvantages of libraries

A

Any 2 of:

  1. Adding functionality or making specific tweaks can be difficult
  2. Sometimes you are “black-boxed” from the actual implementation
  3. You have to trust that the developers will continue to maintain the library
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

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

What is static linking?

A

All required code from libraries is directly included in the finished machine code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

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