CMSC 125 - 5. Interlude: Process API

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/25

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:12 PM on 10/1/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

26 Terms

1
New cards

fork(), exec()

[Process creation and control in Unix]

  • Uses ____ and ____ system calls

2
New cards

wait()

[Process creation and control in Unix]

  • A process can wait for a process it has created using ______ system call

3
New cards

fork()

system call that creates a new process

4
New cards

address space, registers, PC

[fork()]

  • The newly created process has its own private copy of the _______, _______, and _______.

5
New cards

0

What should the value of rc be to be determined as a child (new process)

int rc = fork();

6
New cards

<0

What should the value of rc be to be determined as fork failed

int rc = fork();

7
New cards

>0

What should the value of rc be to be determined as a parent of child

int rc = fork();

8
New cards

0, child PID

fork() returns ______ to the child process and the ______ to the parent process

9
New cards

non-deterministic, scheduler

[fork()]

The order of execution of the parent and child processes is _________, dependent on the _______

10
New cards

wait()

This system call won’t return until the child has run and exited

11
New cards

deterministic

Adding the call to wait() on the code block for the parent process guarantees the ______ order of execution

12
New cards

exec()

Run a program that is different from the calling program

13
New cards

code, static data

[exec()]

The child process will have different ____, _____, address space, registers, PC

14
New cards
  • essential for building a shell

  • It allows the shell to alter the environment of the about to be run program by exec(), enabling more features (ex. Pipes and I/O redirection) to be implemented

Why separate fork() and exec()?

15
New cards

an “interface” program that accepts commands from users to access the services of the OS

16
New cards

BASH, ZSH

examples of shells in Linux

17
New cards

Command Prompt, Powershell

examples of shells in Windows

18
New cards

kill()

used to send signals to a process

19
New cards

SIGINT

pressing CTRL+c

20
New cards

SIGSTOP

pressing CTRL+z

21
New cards

SIGCONT

fg command

22
New cards

Signals subsystem

________ enable the delivery of events to processes

23
New cards

signal handlers, signal()

Processes and process groups can have ______ (via ______ system call) to perform a specific action whenever a specific signal is received

24
New cards

users

Processes are associated to ______ in order to provide ownership and control, as well as limited security and protection

25
New cards

getuid()

system call to return the user id of the user of the process calling it

26
New cards
  • main

  • top/htop

  • ps/pstree

  • kill/killall

  • fg/jobs

  • /proc

Useful programs and commands in Linux terminal

Explore top notes

note
Investigating Springs
Updated 1262d ago
0.0(0)
note
Color Theory
Updated 1276d ago
0.0(0)
note
APUSH 2.2 European Colonization
Updated 1135d ago
0.0(0)
note
Context in feminist literature
Updated 152d ago
0.0(0)
note
第一课 你周末有什么打算
Updated 1167d ago
0.0(0)
note
the silk road
Updated 1138d ago
0.0(0)
note
Period 1 and 2 Timeline - APUSH
Updated 1199d ago
0.0(0)
note
Investigating Springs
Updated 1262d ago
0.0(0)
note
Color Theory
Updated 1276d ago
0.0(0)
note
APUSH 2.2 European Colonization
Updated 1135d ago
0.0(0)
note
Context in feminist literature
Updated 152d ago
0.0(0)
note
第一课 你周末有什么打算
Updated 1167d ago
0.0(0)
note
the silk road
Updated 1138d ago
0.0(0)
note
Period 1 and 2 Timeline - APUSH
Updated 1199d ago
0.0(0)

Explore top flashcards

flashcards
Definitions: Parts of Speech
22
Updated 382d ago
0.0(0)
flashcards
GMGT - Class 9
25
Updated 877d ago
0.0(0)
flashcards
Spanish 2: Vocab 7B
30
Updated 732d ago
0.0(0)
flashcards
Polgov lesson 2
46
Updated 1068d ago
0.0(0)
flashcards
I geese(English)
20
Updated 1097d ago
0.0(0)
flashcards
Cellular Respiration Test
29
Updated 1114d ago
0.0(0)
flashcards
Definitions: Parts of Speech
22
Updated 382d ago
0.0(0)
flashcards
GMGT - Class 9
25
Updated 877d ago
0.0(0)
flashcards
Spanish 2: Vocab 7B
30
Updated 732d ago
0.0(0)
flashcards
Polgov lesson 2
46
Updated 1068d ago
0.0(0)
flashcards
I geese(English)
20
Updated 1097d ago
0.0(0)
flashcards
Cellular Respiration Test
29
Updated 1114d ago
0.0(0)