Topic C Flashcards

1
Q

What is multiprogramming?

A
  • Loading several programs into memory simultaneously, all sharing a single CPU
  • when the running program can’t continue (waiting for I/O) switch to another program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is Multi-Access Time Sharing?

A

Each program has time slices. The program will run for a specified amount of time that’s dictated by the operating system then switch into waiting after it’s time slice is up

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

How long are time slices?

A

milliseconds long

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

what does the CPU switching rapidly between processes do?

A

It gives the illusion of uninterrupted execution in parallel

- makes it seem like multiple programs are running at once

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

What is the idea of a time slice?

A

the OS will split process time into a fixed quantum. At the end of a time slice the CPU sends an interrupt to the OS which puts a bit of its own OS code onto the CPU this code swaps out the running process and puts a new process onto the CPU, sets up the instruction pointer to wherever it needs to go and that program runs on the CPU

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

What is an interrupt

A

an automatic call of a sequence of instructions to deal with an event occurring outside normal program execution

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

what is the ISR

A

The sequence of instructions stored in that reserved area of memory

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

What is the interrupt service routine also known as?

A

the interrupt routine or interrupt handler

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

How do we protect the register values of the program that was running when an interrupt happened?

A
  • we save them all in the process control block

- this is a table of descriptors one for each process maintained by the OS

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

What happens during a context switch?

A

The state of the current program gets stored in its process control block.

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

What is the difference between programs and processes

A
  • A program is a static thing that the programmer writes, it could be source code or object code
  • the process is the running version of a program
  • A single program can have multiple processes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does an OS structure consist of?

A
  • A central kernel
  • A set of processes
  • system calls
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does the kernel do?

A

performs low level, frequently needed activity. Performs 4 processes in particular that help to keep the computer under control

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

What does the system calls do?

A

allows a particular process wants to spawn another process to do something.

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

What is the bootstrap program

A

it reads from the OS from disk and puts it into memory. It loads the IP and points it to the first instruction of the OS itself

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

What is the command interpreter or shell?

A

It’s a normal user level process that might have some built in commands but usually it waits for the user to request to run a program/series of programs and it will trigger the processes that are needed to make that happen.

17
Q

how do we request the command interpreter’s services?

A

Via System calls

18
Q

What are the 5 major components of the OS

A
The processor manager
The memory manager 
The file manager 
The device manager 
The user command interface
19
Q

What are the 4 managers inside an OS?

A
The processor manager
The memory manager 
The file manager 
The device manager 
(the network manager is the 5th which is part of more modern systems)
20
Q

What tasks must each subsystem manager must perform?

A
  • monitoring of resources
  • enforcement of policies that determine who gets what resources
  • allocation of resources
  • de-allocation of resources
21
Q

What does the memory manager do?

A
  • preserves/protects space in memory occupied by the OS
  • checks validity of each request for memory space
  • allocates memory for legal requests
  • keeps track of which users are using which sections of memory
  • de allocates memory that’s no longer needed
22
Q

What does the processor manager do?

A
  • creates processes when necessary to carry out tasks
  • performs initialisation of new processes
  • keeps track of processes’ status
  • assigns processes to the CPU
  • changes state of a process
  • Handles termination of processes
  • handles inter-process communication
  • manages prioritisation of processes
23
Q

What does the device manager do?

A
  • allocates the system’s devices
  • deals with multiple requests for the same device
  • communicates with devices during operation
  • deallocates devices when no longer needed
24
Q

What does the file manager do?

A

f

25
Q

What does the network manager do?

A
  • provides facilities for users to share resources while controlling access to them
  • has a network stack that holds all of the protocols in TCP/IP and retrieving an IP address, making sure you have an IP address, making sure you know what your DNS are.
26
Q

What does each process have as part of it’s process descriptor?

A
  • they all have a different ID so that the OS can identify them programmatically
27
Q

What does the device manager do?

A
  • allocates the system’s devices
  • deals with multiple requests for the same device
  • communicates with devices during operation
  • deallocates devices when no longer needed
28
Q

What are the three main states?

A

running, ready, blocked (waiting)

29
Q

What does the network manager do?

A
  • provides facilities for users to share resources while controlling access to them
  • has a network stack that holds all of the protocols in TCP/IP and retrieving an IP address, making sure you have an IP address, making sure you know what your DNS are.
30
Q

What does each process have as part of it’s process descriptor?

A
  • ## they all have a different ID so that the OS can identify them programmatically
31
Q

What does the Process Control Block contain?

A
  • unique process ID
  • process state
  • position in memory
  • accounting stats (time used)
  • resources allocated
  • register values?
32
Q

What are the three main states?

A

running, ready, blocked (waiting)

33
Q

How many processes are in each state?

A

Only 1 in the running state, many in the ready state and many in the blocked/running state

34
Q

How do interrupts effect processes in each state

A
  • a process in the running state will receive an interrupt saying its time slice is up and to move into the blocked(waiting) state
  • a process in the blocked state will receive an interrupt telling it it has received what it was waiting for and to move into the ready state