Operativsystem Flashcards

1
Q

What is the maximum number of processes that can be in Ready state for a computer system with n CPU:s?

A

The maximum number is independent of the amount of CPU:s.

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

What is the purpose of an Operating System?

A

To control execution of application programs, and to act as an interface between applications and the computer hardware.

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

What are the three qualities pertaining to the duties of an Operating System?

A

Convenience - Usability for the human
Efficiency - Optimal resource utilization
Ability to evolve - Updates, basically

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

What is a process?

A

A program in execution. Or, a unit of activity characterized by a single sequential thread of execution, a current state, and an associated set of system resources.

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

What is an interrupt?

A

Activity suspension. A program status (counter, registers) is saved for further use, and a separate handling routine for the interrupt is executed. Errors can occur in this process.

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

What are the benefits of an Operating system as opposed to writing applications directly for the underlying hardware?

A
  1. Multithreading
  2. User Interfaces
  3. Abstraction of hardware
  4. Future proofing, either through unobstructed updates or abstracting the underlying hardware making it more easily changed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe a Page, a Page Table and the process of paging.

A

FUCK

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

What is the purpose of a scheduler in the core of an OS?

A

The scheduler assigns processor-time between different processes and threads that are run.

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

What is Thrashing?

A

When a computers virtual memory resources are overused, a constant state of paging and page faults can occur. This inhitibs most application-level process and causes the performance of the computer to degrade, or even collapse.

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

Within the context of Replacement Policies for the main memory, describe the Optimal Policy.

A

The optimal policy selects the page for which the time to the next reference is the longest for replacement.

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

Within the context of Replacement Policies for the main memory, describe Least Recently Used (LRU)

A

We replace the page that has not been referenced for the longest time.

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

Within the context of Replacement Policies for the main memory, describe First In, First Out (FIFO)

A

The page that has been in memory the longest is replaced first.

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

Within the context of Replacement Policies for the main memory, describe the Clock-policy

A

Every page has an additional bit called a use bit. When a page is loaded into memory, the use bit is set to 1. When a page is referenced, the use bit is set to 1. However, during the search for replacement, each use bit set to 1 is changed to 0.

When it’s time to replace a page,the first page encountered with a use bit set to 0 is replaced.

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

Within the context of Uni-processor scheduling, what constitutes long-term scheduling?

A

Which programs are admitted to the system for processing. Long-term scheduling controls the degree of multiprogramming.

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

Within the context of Uni-processor scheduling, what constitutes medium-term scheduling?

A

Medium-term scheduling is part of ‘the swapping function’ and manages the degree of multiprogramming.

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

Within the context of Uni-processor scheduling, what constitutes short-term scheduling?

A

Short-term scheduling is invoked when an event occurs (clock interrupts, I/O interrupts, OS calls and signals) and is known as the dispatcher. Heavily performance-related.

17
Q

Processes have priorities. What does this mean?

A

The scheduler will choose a process to execute based on its priority and will always choose the highest.There are multiple ready queues which represent each level of priority, and lower priority-level processes may suffer starvation due to this.

18
Q

Within the context of Uni-processor scheduling of processes, describe the ‘First-Come-First-Served’ standard

A

The oldest process in the ready queue is selected for execution.

19
Q

Within the context of Uni-processor scheduling of processes, describe the ‘Round-Robin’ standard

A

A process gets ‘q’ amount of time to run, and is interrupted when that amount of time is up. If the process still needs execution, it’s placed in the back of the ready-queue.

20
Q

Within the context of Uni-processor scheduling of processes, describe the ‘Shortest-Process-Next’ standard

A

The process with the shortest expected processing time is selected next. Short processes jump ahead of longer processes

21
Q

Within the context of Uni-processor scheduling of processes, describe the ‘Shortest-Remaining-Time’ standard

A

The process with the estimated shortest remaining time is executed first. Note however, that if the process exceeds this amount of time it is interrupted.