Process and CPU Scheduling Flashcards

1
Q

Process Concept

A

When a program is added to the memory and executed the same, it becomes a process which performs all the task mentioned by the program.

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

Components of Process

A
  1. Stack
  2. Heap
  3. Data
  4. Text
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Process State

A

The state of the process is defined in part by the current activity of that process.

5 states- New, Ready, Running, Waiting, Terminated

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

Process Control Block

A

A process control block of a computer operating system stores all the information about the process.

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

Attributes of Process Control Block

A
  1. Process ID
  2. Process State
  3. Program counter
  4. CPU-scheduling information
  5. Memory-management information
  6. Accounting information
  7. I/O status information
  8. CPU registers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Thread

A

A thread is a basic unit of CPU utilization and is a single sequential flow of tasks of a process.

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

Types of Thread

A
  1. User-level Thread
  2. Kernel-level Thread
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Components of Thread

A
  1. Program Counter
  2. Register Set
  3. Stack Space
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Multithreading Models

A
  1. Many-to-one relationship
  2. One-to-one relationship
  3. Many-to-many relationship
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Process Scheduling

A

The act of determining which process is in ready state, and should be moved to running state is known as Process Scheduling.

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

Scheduling Queues

A
  1. Job Queue - Consists all the process in the system.
  2. Ready Queue - This queue keeps a set of all processes residing in main memory, ready and waiting to execute.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Schedulers

A

These are the special system software which handle process scheduling in many ways.

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

Types of Schedulers

A
  1. Long-term - A balanced mix of jobs, such as I/O bound and processor bound.
  2. Short-term - To increase system performance in accordance with chosen set of criteria.
  3. Medium-term - In-charge of handling the swapped-out processes.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Context Switch

A

It is a mechanism to store and restore the context of a CPU in a process control block so that process execution can be resumed from the same point at a later time.

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

Pre-emptive Scheduling

A

The scheduling which takes place when a process switches from running state to ready state or from waiting state to ready state.

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

Non-pre-emptive Scheduling

A

It is used when a process terminates, or a process switches from running to a waiting state.

17
Q

Dispatcher

A

When the scheduler completes its job of selecting a process, it is the dispatcher which performs the task of allocating the selected process to the CPU.

18
Q

Function of dispatcher

A
  1. Switching context
  2. Switching to user mode
  3. Jumping to the proper location
19
Q

Different scheduling criteria

A
  1. CPU utilization
  2. Throughput
  3. Turnaround time
  4. Waiting time
  5. Response time
20
Q

First-Come, First-Served

A

It states that the process that requests the CPU first is allocated the CPU first and is implemented by FIFO queue.

21
Q

Shortest Job First

A

The process with the shortest burst time is scheduled first. If two processes have the same burst time, then FCFS is used to break the tie.

22
Q

Priority Based Scheduling

A

The process with high priority is to be executed first and so on. Processes with same priority are executed on first come first served basis.

23
Q

Round Robin Scheduling

A

CPU is assigned to the process on the basis of FCFS for a fixed amount of time called quantum time. After it expires, the running process is preempted and sent to the
ready queue. Then the processor is assigned to the next arrived process.

24
Q

Shortest remaining time

A

In this, the processor is allocated to the job closest to completion, but it can be pre-empted by a newer ready job with a shorter time to completion.

25
Q

Multiple-Level Queues Scheduling

A

These are not independent scheduling algorithms. They make use of other existing algorithms to group and schedule jobs with common characteristics.

26
Q

Processor Affinity

A

It is a concept that allows an OS to control the way applications use a computer’s processor resources.

27
Q

Approaches to Multiple-Processor
Scheduling

A
  1. One approach is when all the scheduling decisions and
    I/O processing is handled by a single processor which is
    called the Master Server and the other processors
    executes only the user code.
  2. A second approach uses Symmetric Multiprocessing where
    each processor is self scheduling
28
Q

Load Balancing

A

Load Balancing is the phenomena which keeps
the workload evenly distributed across all processors in an SMP
system.

29
Q

Process Coordination

A

Process coordination comprises mechanisms for processes
carrying out cooperative work, usually by means of
communication (pipes, sockets, shared memory.)

30
Q

Process Synchronization

A

Process Synchronization is the task of coordinating the
execution of processes in a way that no two processes can
have access to the same shared data and resources.

31
Q

Critical Section Problem

A

Critical section is a code segment that
can be accessed by only one process at a
time.

32
Q

Solution for critical section problem

A
  1. Mutual Exclusion
  2. Progress
  3. Bounded Waiting
33
Q

Peterson’s Solution

A

Peterson’s Solution is a classical software
based solution to the critical section
problem.

34
Q

Synchronization Hardware

A
  • Many systems provide hardware support for critical section code.
  • The critical section problem could be solved easily in a single processor environment if we could disallow interrupts to occur while
    a shared variable or resource is being modified.
35
Q

Mutex lock

A

In this approach, in the entry
section of code, a LOCK is acquired over the critical resources
modified and used inside the critical section, and in the exit
section that LOCK is released.

36
Q

Semaphore

A

A semaphore is a signaling mechanism and a thread that is waiting on a
semaphore can be signaled by another thread. This is different than a mutex as
the mutex can be signaled only by the thread that called the wait function.