c++ Flashcards

1
Q

The process space addresses always have a ___in the most significant bit; the kernel space addresses always have a ___ in the most significant bit.

A

zero

one

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

In Microsoft Windows, the boundary between process space, and kernel space can be adjusted with ‘4-
gigabyte tuning’ (4GT) to provide a 3GiB process space, and a 1GiB kernel space. With Windows 7, the
amount can be customized to any process space size between

A

2048MiB (2GiB) and 3072MiB (3GiB).

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

The interrupt vector table

A

is read-only block of addresses (read/write to the kernel) listing the interrupt
handlers for the system. It is not relevant to this discussion other than to recognize why our processes
don’t start at location zero.

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

Text Segment

Alias: Code Segment

A

The text segment contains code, and depending
on the compiler, literal values are embedded
along with the code.
Text Segments are placed below the heap and
the stack to help prevent memory overruns from
corrupting the code. Where operating systems
support memory segment protection, the text
segment can be tagged as read-only.
Since text pages are never modified, the text
segment can also be shared between multiple
identical processes.

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

Data Segment

A

The data segment contains variables that have a
lifespan that begins when the process is
launched and extends until the process
terminates. It is in turn divided into three parts.
The first part holds read-only variables that are
initialized when constructed, the second part
holds initialized modifiable variables, and the
third holds uninitialized variables. The size of
the data segment is determined at compile time,
and that size is fixed for the life of the process.

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

Command Line & Environment

A

The command line & environment section resides at the top of the process space. It is placed here since
its size won’t be known until the process is loaded and the command-line and environment information
are passed from the operating system.
Why is this? The operating system maintains an environment that contains information about the context
in which your program runs. This includes the current working directory, environment variables, and
command-line arguments. These values usually have system wide or account wide settings, but can be
overridden by temporary changes to the local shell, the user providing command-line arguments, or by
invoking process functions such as spawn() that facilitate the customization of the environment when
programmatically launching an application.

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