CPU Modes and Memory Flashcards

1
Q

What are the 3 IA-32 CPU Modes?

A
  • Real mode
  • Protected mode
  • System management mode
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which mode is the mode discussed in this course?

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

System Management Mode

A
  • used for power management tasks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Real Mode

A
  • at power up or rest
  • can only access 1 MB memory
  • no memory protection
  • privilege levels (kernel vs. user space) not possible
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Protected Mode

A
  • Up to 4GB memory
  • Memory protection
  • Privilege level
  • Multi-task
  • Supports Virtual-8086 mode
    • Used to operate outdated software
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Memory Models

A
  • Flat memory model
  • Segmented model
  • Real-address mode model
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What model is this course primarily concerned with?

A
  • flat memory model
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

32-bit Linux CPU Model and Model

A
  • Protected mode
  • Flat memory model
  • 4GB addressable space => 2^32
  • Memory protection
  • Privilege levels of code
  • Segment registers point to segment descriptor tables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the three types of Segment Descriptor Tables?

A
  • Global Descriptor Table (GDT)
  • Local Descriptor Table (LDT)
  • Interrupt Descriptor Table (IDT)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the levels of the Virtual Memory Model

A
  1. Kernel Space
    - ——– USER SPACE (2-7) ——–
  2. Stack: funtion args and local vars
  3. Shared libs and mappings
  4. Heap: dynamic memory
  5. BSS: uninitialized data
  6. Data: initialized data
  7. Text: program code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How can you view process organization starting with ‘ps’?

A
  • ps
  • Get the PID
  • cat /proc//maps
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How can you map a process with GDB?

A
  • gdb /bin/bash
  • break main
  • run
  • info proc mappings
How well did you know this?
1
Not at all
2
3
4
5
Perfectly