Operating System Flashcards

1
Q

What is an operating system?

A

• a program or set of programs that manages the operations of the computer for the user.

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

What functions does the operating system provide?

A
  • Memory management
  • Interrupt service routines
  • Processor scheduling
  • Backing store management
  • management of all input and output
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does the operating system handle memory management?

A
  • Programs and their data need to be loaded into RAM
  • Operating system must manage the allocation of RAM to the different programs
  • There may not be sufficient RAM for all desired processes to be completely loaded into RAM at once, so the allocation and management of space is controlled by the operating operating system.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are pages?

A
  • Memory is divided into fixed size chunks called pages.

* Each page has an address.

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

What happens to a process loaded into RAM?

A

It is allocated sufficient pages.

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

What does a page table do?

A

Maps between the logical memory locations and the physical memory locations.

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

What is segmentation?

A
  • Logical division of address space into varying length segments which depend on the program structure.
  • It is possible to load only part of a program into memory initially.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What happens to the hard disk for virtual memory to become available?

A

An area of the hard disk that is designated as virtual memory.

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

What is disk thrashing?

A
  • if many processes are running and the computer has insufficient RAM, lots of time is spent swapping pages in and out of virtual memory.
  • Repeatedly swapping pages can noticeably slow down the computer, this is disk thrashing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is an interrupt?

A

A signal from a software program, hardware device or internal clock to the CPU.

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

What happens when an interrupt is detected?

A
  • The processor stops fetching instructions and instead pushes the current contents of its registers onto a stack.
  • Suspends execution of the running programs, or process and disables all interrupts of a lower priority.
  • Then it puts the values of the program counter and of each register onto the system stack.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the purpose of an interrupt?

A
  • Interrupts are triggered regularly by a timer.
  • This is to indicate that it is the turn of the next process to have processor time.
  • It is because the processor is able to be interrupted, that multi tasking can take place.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what processes the interrupt?

A

Interrupt service routine.

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

What is interrupt priority?

A
  • Interrupts have different priorities, and can be processed in order of priority.
  • Interrupts can be interrupted if the new interrupt is of a higher priority.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What happens if a higher priority interrupt occurs while an interrupt is being processed?

A

The original interrupt’s registers will also be pushed into the stack

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

What is the structure of the Stack?

A

LIFO

Last in first out

17
Q

What is the processor scheduling?

A
  • A single CPU can only process instructions for one application at a time.
  • The operating system must schedule when each application can use the CPU.
  • This provides the illusion of multi tasking.
18
Q

What are the the objectives of scheduling?

A
  • Provide an acceptable response time to all users
  • Maximise the time the CPU is usefully engaged
  • To ensure fairness on a multi user system .
19
Q

What is round robin scheduling?

A

Processes are dispatched on a first in first out basis.
• Each job is allocated a time slice during which it can use the CPU’s resources.
• If the job has not completed by the end of its time slice, the next job is allocated a time slice.

20
Q

How does the operating system achieve round robin?

A

• Sets an interrupting clock to generate interrupts at specific times.

21
Q

What are some advantages of round robin?

A

Guarantees a reasonable response time to all users of the system.

22
Q

What is first come first served?

A

First job to arrive is executed till completion

23
Q

What is shortest remaining time?

A
  • The time to completion is estimated as each new job arrives
  • Job with the shortest remaining time to completion is executed, meaning that a shorter new job can take over fro the current process.
24
Q

What is shortest job first?

A
  • Total execution time is estimated by the user.

* Job with the smallest total execution time is executed when the current job completes.

25
Q

What are the purposes of multi level feedback queues?

A
  • Give preference to short jobs.
  • Give preference to I/O bound processes
  • Separate processes into categories based on their need for the processor.
26
Q

How do multi level feedback queues work?

A

Implements several job queues and jobs can move between queues depending on how much processor time they have used.
• Multiple queues are created with different priority levels.
• If a job uses too much CPU time it is moved to a lower priority queue.
• Processes can also be moved to a higher priority queue if they have waited a long time.