chapter 3 Flashcards

1
Q

weight of a process

A

refers to the amount of resources and effort required by the OS to manage it, such as creation, scheduling and termination effort. Other factors contributing to the weight of a process is:
- size of its context
- CPU scheduling decisions
- context saving and loading

classic unix processes are considered to be heavyweight

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

threads (Fäden)

A
  • is a leightweight process
  • share all segments except the stack
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

kernel-level threading (1:1)

A
  • each user-level thread corresponds directly to one kernel-levle thread. This model treats threads as lightweight processes, meaning that multiple threads can exist within a single process`s @ space, each managed individually by the CPU (pthreads)
  • The CPU is aware of each thread and is responsible for their creation, snchro and destruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

user-level threading (m:1)

A
  • multiple user-level threads are managed within a single kernel-level thread (a single @ space)
  • featherweight processes, leighter than kernel threads
  • thread management is done in the user level and not kernel level
  • entire process will be blocked if one thread makes a blocking call
  • one thread can access CPU at a time, cant run in parallel
  • CPU has no knowledge about these threads, since they are implemented in the app level
  • extremely fast context switching
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

hybrid-level threading (m:m)

A
  • combines both types of threading
  • featherweight processes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

general info

A

linux makes no difference between heavyweight and lightweight processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

command “which”

A
  • which vi (vi is a command)
  • outputs the directory of the command
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

command “vi”

A
  • vi <filename> — Open or edit a file, start executing the command</filename>
  • to stop it, hit Ctrl-z
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

command “&”

A
  • emacs bar.c &
  • when added at the end, emacs will be started in the background
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

command “jobs”

A
  • type only jobs in the terminal
  • outputs all started commands
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

command “bg”

A
  • sends an already stopped command into the background and resumes executing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

>

A
  • redirecting stdout
  • echo “Hello” > text
  • stores the output in text
  • ls -l > file.txt will store the output in file.txt
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

<

A
  • redirecting stdin
  • wc < file1.txt will read the intput from file.txt
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

copy-on-write (COW)

A

with the help of MMU, parent and child processes share the same code and data segment.
only when the child progress changes data, the segment is copied.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly