Chapter 4 Flashcards

1
Q

Differentiate a job and a process.

A

A process is an active entity and an instance of a program that requires a set of resources while a program is an unactive entity submitted by user.

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

What is multi-threading?

A

Multithreading allows applications to manage a separate process with several threads of control.

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

What is multiprogramming?

A

The processor allocated to each job or to each process for a period of time and deallocated at an appropriate moment

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

What’s the one condition that allows several jobs or processes to share a single processor.

A

Scheduling policy

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

What are the two submanagers the composes the Process Manager?

A

Job Scheduler (high-level scheduler) and Process Scheduler (low-level scheduler)

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

The Job Scheduler’s goal is___.

A
  1. To put jobs in a sequence that best meets the designers or admins’ goals.
  2. To keep most components of the computer system busy most of the time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The Process Scheduler ____

A
  1. Determines which processes will get the CPU, when, and for how long.
  2. Decides what to do when processing is interrupted
  3. Determines which waiting lines (queues) the job should be moved to during its execution.
  4. Recognizes when a job has concluded and should be terminated.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the purpose of a middle-level scheduler in a highly interactive environment?

A

Manages the swapping in and out of jobs

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

Outline the job status, process status or thread status .

A
  1. HOLD - status of a job after the it is accepted by the system
  2. READY - jobs move to this status after interrupts are resolved
  3. RUNNING - status of a job currently being processed
  4. WAITING - job can’t continue until a specific resource is allocated or an I/O operation has finished
  5. FINISHED - status of a completed job
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Each process in the system is represented by a data structure called a __.

A

Process Control Block

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

Each thread in the system is represented by a data structure called a __.

A

Thread Control Block

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

Outline the contents of a Process Control Block (PCB).

A

Process identification
Process status
Process state:
Process status word
Register contents
Main memory
Resources
Process priority
Accounting

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

Outline the contents of a Thread Control Block (TCB).

A

Thread identification
Thread state
CPU information:
Program counter
Register contents
Thread priority
Pointer to process that created this thread
Pointers to all other threads created by this thread

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

What are characteristics of a good scheduling policy?

A
  1. Maximize throughput - Run as many jobs as possible in a given amount of time
  2. Minimize response time - Quickly turn around interactive requests
  3. Minimize turnaround time - Move entire jobs in and out of the system quickly
  4. Minimize waiting time - Move jobs out of the READY queue as quickly as possible
  5. Maximize CPU efficiency - Keep the CPU busy 100 percent of the time
  6. Ensure fairness for all jobs - Give everyone an equal amount of CPU and I/O time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A job runs until___.

A
  1. The timer goes off
  2. The job issues an I/O command
  3. The job is finished
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

An I/O request is called a __.

A

natural wait

17
Q

Preemptive scheduling policy is commonly used in time-sharing environments. Describe this scheduling strategy.

A

This strategy interrupts the processing of a job and transfers the CPU to
another job

18
Q

Describe the nonpreemptive scheduling policy.

A

A job remains in in the RUNNING state uninterrupted until it issues an I/O request (natural wait) or until it is finished.

19
Q

List the scheduling algorithms.

A
  1. First-Come, First-Served
  2. Shortest Job Next
  3. Priority Scheduling
  4. Shortest Remaining Time
  5. Round Robin
  6. Multiple-Level Queues*
  7. Earliest Deadline First
20
Q

Describe the First-Come, First-Served scheduling algorithm.

A
  • a nonpreemptive scheduling algorithm that is easy to implement
  • handles all incoming objects according to their arrival time: the earlier they arrive, the sooner they’re served
  • there are no WAIT queues
21
Q

What is the disadvantage of the First-Come, First-Served scheduling algorithm?

A

The average turnaround times vary widely and are seldom minimized. In fact, when there are three jobs in the READY queue, the system has only a 1 in 6 chance of running the jobs in the most advantageous sequence (C, B, A)

22
Q

Describe the Shortest Job Next scheduling algorithm

A
  • a nonpreemptive scheduling algorithm that minimizes average
    waiting time
  • handles jobs based on the length of their CPU cycle time
23
Q

What is the disadvantage of the Shortest Job Next scheduling algorithm?

A
  • Indefinite postponement of some jobs
  • requires execution times in advance
24
Q

Describe the Priority scheduling algorithm

A
  • a nonpreemptive algorithm
  • gives preferential treatment to important jobs and they aren’t interrupted until their CPU cycles are completed or a natural wait occurs.
  • different queue for each priority level
25
Q

Describe the Shortest remaining time scheduling algorithm

A
  • a preemptive version of the SJN algorithm that ensures fast completion
    of short jobs
  • processor is allocated to the job closest to completion
  • requires advance knowledge of the CPU time required to finish each job
26
Q

What is the disadvantage of the Shortest remaining time scheduling algorithm?

A

It involves more overhead than SJN—it requires the operating system to frequently monitor the CPU time for all the jobs in the READY queue and it must perform context switching for the jobs being swapped at preemption time

27
Q

Describe the Round Robin scheduling algorithm.

A
  • a preemptive process scheduling algorithm
  • used extensively in interactive systems
  • processes equally share CPU by a time slice (time quantum)
28
Q

What is the disadvantage of the Round Robin scheduling algorithm?

A

The efficiency of Round Robin depends on the size of the time quantum in relation to the average CPU cycle.
If the quantum is too large—that is, if it’s larger than most CPU cycles—then the algorithm reduces to the FCFS scheme.
If the quantum is too small, then the amount of context switching slows down the execution of the jobs and the amount of overhead is dramatically increased.

29
Q

What are rules of thumb in deciding the proper time quantum?

A
  1. It should be long enough to allow 80 percent of the CPU cycles to run to completion
  2. It should be at least 100 times longer than the time required to perform one context switch.
30
Q

Describe the Multiple-Level Queues scheduling algorithm.

A
  • found in systems with jobs that can be grouped according to a common characteristic
  • works in conjunction with several of the schemes
31
Q

Outline four primary cases of queue movements in Multiple-Level Queues scheduling algorithm.

A
  1. No Movement Between Queues
  2. Movement Between Queues
  3. Variable Time Quantum Per Queue
  4. Aging
32
Q

Describe the Earliest Deadline First scheduling algorithm.

A
  • a dynamic priority algorithm
  • a preemptive scheduling algorithm built to address the critical processing requirements of real-time systems and their pressing deadlines
  • the closer the deadline, the higher the priority
  • the goal is to complete all jobs before each one reaches its deadline
33
Q

What is the disadvantage of the Earliest Deadline First scheduling algorithm?

A
  1. A job with a closer deadline will cause the other waiting jobs to be delayed
  2. High overhead requirements because it constantly evaluates the deadlines of all the jobs awaiting execution