程序代写 COMP 3430 Guderian

Operating Systems
COMP 3430 Guderian

Copyright By PowCoder代写 加微信 powcoder

What do processes look like?
Static data

What it looks like 2
Process image via

Holds all the metadata for the process:
We saw this in task_struct, th

Holds all the metadata for the process: A. Process ID
We saw this in task_struct, th

Holds all the metadata for the process:
A. Process ID
B. Parent Process ID
We saw this in task_struct, th

Holds all the metadata for the process:
A. Process ID
B. Parent Process ID
We saw this in task_struct, th

Holds all the metadata for the process:
A. Process ID
B. Parent Process ID
D. Process state information
We saw this in task_struct, th

Holds all the metadata for the process:
A. Process ID
B. Parent Process ID
D. Process state information
State, priority, open files
We saw this in task_struct, th

Holds all the metadata for the process:
A. Process ID
B. Parent Process ID
D. Process state information
State, priority, open files Registers
We saw this in task_struct, th

Holds all the metadata for the process:
A. Process ID
B. Parent Process ID
D. Process state information
State, priority, open files
E. Memory allocated
We saw this in task_struct, th

The /proc filesystem More notable:

The /proc filesystem
More notable: Anything oom means out-of-memory

The /proc filesystem More notable:
Anything oom means out-of-memory /proc/(pid)/stat – status of the process

The /proc filesystem More notable:
Anything oom means out-of-memory /proc/(pid)/stat – status of the process /proc/(pid)/status – more human-readable version

ps exposes some of this to us
ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm

What is a binary, anyway
Good question…

What is a binary, anyway
Good question… Anything encoded with 0s and 1s

What is a binary, anyway
Good question… Anything encoded with 0s and 1s And we have to be able to read them

Reading binary files
We get to use some syscalls!
open (see man 2 open)
read (see man 2 read) lseek (see man lseek) #pragma pack
uintX_t (see man stdint.h)

What encoding do
processes use?
ELF – man elf?

What encoding do processes use?
ELF – man elf? Executable and Linking Format (ELF)

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