Week 3/4 Flashcards

(20 cards)

1
Q

Virtualizing the CPU

A

creates an illusion that many virtual CPUs exist when there is only one physical CPU

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

Time Sharing

A

A technique that allows users to run concurrent processes. Allows the resource to be used by ONE entity for a short time and then another entity and so on.

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

Space Sharing

A

Resources are divided in space among the processes who want to use it.

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

Mechanisms

A

Low-level machinery / Low-level methods or protocols that implement a functionality

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

Context Switching

A

The underlying mechanism of saving (and restoring) the state of a process..

gives OS the ability to stop running a program and start running another on a CPU.

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

Policies

A

algorithms for making a decision within the OS.

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

Machine State

A

what a program can read or update when its running. Some components include:
Memory
I/O information

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

Program Counter (PC)

A

tells us which instruction of the program will execute next

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

How does process creation work?

A

1.Load code to any static data
2.OS allocates memory for the stack and heap
3.OS does initialization tasks like I/O streams
4.Run the program through main()
—————————-

Another Answer (for LINUX):

  1. using fork() to create a parent/child process
  2. using exec() on the child process to transform the process intoanything the user wants
  3. First process (init) started by the kernel

Done w/ the help of a process tree

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

Loading data history (Early vs Now)

A

Early times: loading processes were done eagerly (all at once)
Now: loading processes are done lazily (loads data only as needed)

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

3 Process States

A

Running: currently executing instructions
Ready: process is ready to run
Blocked: not ready to run because another event is taking place (such as an I/O operation). This allows the OS to run a different process.

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

Scheduled

A

When a process is moved from ready to running

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

Descheduled

A

When a process is moved from running to ready

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

Other Process States

A

Initial and Final (Zombie) States

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

Process List

A

contains information about all the processes in the system, each entry is found in a process control block (PCB). Allows the OS to track pieces of info

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

The process Tree Model

A

Organizing processes in trees where:
- each process has a parent, that can have 0 or more children.
- When the parent terminates, all children terminate
- If the child terminates the parent continues running

17
Q

Who starts the first process?

A

init in Linux

18
Q

What are system calls/syscalls

A

basically a function created by the OS.

wrappers take care of issuing syscalls
Meaning the calls themselves dont execute the function but the syscalls inside the actual function after it is called.

19
Q

How to create a start of a simpel shell that reads commands

A

while (TRUE){
type_prompt();
read_command(command,parameters);

}