Module 3a - Processes Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What does “ps” command in linux do?

A

Lists running processes

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

<p></p>

<p>What does the "top" command do in linux?</p>

A

<p></p>

<p>Displays processes with top resource usage</p>

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

<p></p>

<p>What does the "kill" / "pkill" / "killall" command do in linux?</p>

A

<p></p>

<p>terminates a process</p>

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

<p></p>

<p>What does "jobs" do in linux?</p>

A

<p></p>

<p>Lists currently running jobs</p>

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

<p></p>

<p>What does "bg" do in linux?</p>

A

<p></p>

<p>Backgrounds a job</p>

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

<p></p>

<p>What does "fg" do in linux?</p>

A

<p></p>

<p>Foregrounds a job</p>

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

<p></p>

<p>What does "nice" / "renice" do in linux?</p>

A

<p></p>

<p>Sets the priority of a process</p>

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

<p></p>

<p>What makes IPC (inter-process communication) using a named pipe in linux/unix costly?</p>

A

<p></p>

<p>IPC with a pipe requires the operating system to make a context switch from user space to kernel space, and then back from kernel space to user space</p>

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

<p></p>

<p>How do threads running in the same process typically communicate?</p>

A

<p></p>

<p>Directly through shared memory</p>

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

If an OS kernel supports multithreading through lightweight processes, what does this mean in terms of address spaces?

A

Lightweight processes will share the same address space, just like threads

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

<p></p>

<p>Describe how a multi-threaded server which follows the dispatcher/worker design</p>

A

<p></p>

<p>The dispatcher thread (which does mostly I/O work) receives requests from the network, and feeds them to a pool or worker threads (which do CPU intensive tasks)</p>

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

Applications caninteract with the hardware’s resources through several ways:

  • Directly from the application
  • Through a library that interacts with the OS which interacts with the hardware

How exactly dothese interactionswork? Are they the same privilege?

A
  • An application’s general instructions are always processed by the CPU (direct unprivilegedinteraction)
  • An application can makea call to a library function, or make a system call to the OS
  • A library can make a system call to the OS
  • OS can execute privileged instructions that the application cannot
    When the OS accesses the hardware, it is privileged (kernel). When the application does it directly, it is unprivileged)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is “virtualization” when running applications?

A

Applications often run in a virtualized environment such as JRE or JVM. This isolates the applications from the underlying hardware platform (and sometimes the OS)

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

<p>What are benefits of "virtualization"?</p>

A
  • improves safety since the application won’t be able to access the files, and privileged resources
  • makes the application more replicable
  • easier to maintain
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do networked applications communicate?

How is the format of a message (Binary vs JSON vs text, etc) determined?

A
  • They communicate by exchanging messages through additional infrastructure such as middleware
  • Message passing protocol determines the format of the message (binary vs JSON, vs text, etc)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

<p>What is the difference between an application-specific messaging protocol and an application-independent protocol?</p>

A

<p>Application specific protocols operate purely on the application layer whereas application-independent protocols use the middleware infrastructure to communicate messages</p>

17
Q

<p>Suppose we have a server cluster of many applcation/compute servers. What kind of infrastructure does the system need in order to forward requests from the client?</p>

A

<p>The system needs a load balancer component which opperates as a logical switch (or multiple)</p>