CS代考 CPSC 313 1

• Learning Outcomes
• Identify the properties that we would like the process abstraction to provide.
• How we’ll get there
• What exactly is a process? What is process isolation?

Copyright By PowCoder代写 加微信 powcoder

• What are the system calls that manipulate processes?
• How does the operating system create the process abstraction? • Protected control transfer
• Virtual Memory • Reading:
• Chapter 8: intro and 8.1
CPSC 313 1

Trivial Programs
cat hello.c #include
int main(int argc, char *argv[]) { printf(“Hello, world!\n”);
All code is in the course code repository.
cat goodbye.c #include
int main(int argc, char *argv[]) { printf(“Goodbye, world!\n”);
./hello Hello, world!
./goodbye Goodbye, world!

Strange Phenomena
Reading symbols from hello… (gdb) b main
Breakpoint 1 at 0x400430: file hello.c, line 3.
Starting program: /home/m/mseltzer/313/cs313- coderepo/mar30/hello
Missing separate debuginfos, use: zypper install glibc-debuginfo-2.26- lp151.18.7.x86_64
Breakpoint 1, main (argc=1, argv=0x7fffffffe248) at hello.c:3
3 int main(int argc, char *argv[]) { (gdb)
Reading symbols from goodbye…
(gdb) b main
Breakpoint 1 at 0x400430: file
goodbye.c, line 3.
Starting program:
/home/m/mseltzer/313/cs313-
coderepo/mar30/goodbye
Missing separate debuginfos, use:
zypper install glibc-debuginfo-2.26-
lp151.18.7.x86_64
Breakpoint 1, main (argc=1,
argv=0x7fffffffe248) at goodbye.c:3
3 int main(int argc, char *argv[]) {

Why don’t these programs affect each other?
CPSC 313 4

Why don’t these programs affect each other?
• Programs run in different processes.
• Each process has its own address space.
• Address spaces provide process isolation.
• Process Isolation:
• Anything one process does should not affect what another process does,
unless the processes agree (e.g., set up a communication channel).
• Each process behaves as if it controls the entire machine’s resources.
CPSC 313 5

Where we are going:
• What exactly is an operating system?
• How does control transfer back and forth between user processes
and the operating system?
• How exactly does the OS provide process isolation?
• What is the role of virtual memory in providing process isolation.
CPSC 313 6

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