CS代考 COMP 3430 – Operating Systems

COMP 3430 – Operating Systems
Segmentation part 2

April 6th, 2022

Copyright By PowCoder代写 加微信 powcoder

By the end of today’s lecture, you should be able to:
▶ Describe the concept of segmentation.
▶ List the limits of segmentation.
▶ Describe what happens when you see the
words “Segmentation fault”.
The Woggle-Bug Book (Public Domain)

Segmentation
▶ Allocating full address spaces
▶ Logically separate address spaces into
▶ Allocate only as much of the segment as
is necessary.
▶ Let’s draw some pictures .

Who does that?
wat. (Pixabay License)
Segmentation fault Accessing an address that’s past the bounds of the
allocated segment.

Discuss with your team: Who or what prints out the words “Segmentation fault”?
▶ Your program.
▶ The standard library (e.g., Glibc, musl). ▶ The shell.
▶ The hardware.

Can we catch SIGSEGV?
Let’s write/look at some code.

▶ Segmentation segments address spaces.
▶ “Heap”, “code”, “stack” are put into these segments.
▶ Different parts of the system have different responsibilities related to segmentation faults.

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com