Process Flashcards

1
Q

Process

A

A process is basically a program in execution

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

Stack

A

Stack contains the temporary data such as method/function parameters, return address and local variables

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

Heap

A

This is dynamically allocated memory to a process during its run time

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

Text

A

This includes the current activity represented by the value of Program Counter and the contents of the processor’s registers

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

Data

A

This section contains the global and static variables

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

Process States

A
  • New- The process is in new state when it has just been created.<.li>
  • Ready - The process is waiting to be assigned the processor by the short term scheduler.<.li>
  • Running - The process instructions are being executed by the processor.<.li>
  • Waiting - The process is waiting for some event such as I/O to occur.<.li>
  • Terminated - The process has completed its execution.<.li>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Process Control Block

A

A process control block is associated with each of the processes.
* Process State - This specifies the process state i.e. new, ready, running, waiting or terminated.
* Process Number - This shows the number of the particular process.
* Program Counter - This contains the address of the next instruction that needs to be executed in the process.
* Registers - This specifies the registers that are used by the process. They may include accumulators, index registers, stack pointers, general purpose registers etc.
* List of files - These are the different files that are associated with the process.

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

Long Term Scheduler

A

The job scheduler or long term scheduler selects processes from the storage pool and loads them into memory for execution.

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

Short Term Scheduler

A

The short term scheduler selects one of the processes from the ready queue and schedules them for execution

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

Medium Term Scheduler

A

The medium term scheduler swaps out a process from main memory

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

Context Switching

A

Removing a process from a CPU and scheduling another process requires saving the state of the old process and loading the state of the new process. This is known as context switching

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  1. First-come, first-served (FCFS)
A

where the process is executed on a first-come, first-served basis

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

Preemptive scheduling

A

when a process transitions from a running state to a ready state or from a waiting state to a ready state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. Shortest Job First (SJF
A

SJF is a proactive scheduling algorithm that selects the process with the shortest burst time.

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

Non-preemptive scheduling

A

Is employed when a process terminates or transitions from running to waiting state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  1. Round Robin (RR)
A

RR is a proactive scheduling algorithm that reserves a fixed amount of time in a round for each process. If a process does not complete its execution within the specified time, it is blocked and added to the end of the queue

16
Q
  1. Priority Scheduling
A

This scheduling algorithm assigns priority to each process and the process with the high priority is executed firstest

17
Q

System Calls

A

System call provides an interface between user program and operating system

17
Q

Multilevel queue

A

This scheduling algorithm divides the ready queue into several separate queues, each queue having a different priority

18
Q

Process management system calls in Linux.

A
  • fork − For creating a duplicate process from the parent process.
  • wait − Processes are supposed to wait for other processes to complete their work
  • exec − Loads the selected program into the memory.
  • exit − Terminates the process.