Week 1 Flashcards

1
Q

Operating System

A

Software that acts as intermediary layer between a user and computer hardware

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

How does OS control programs

A

Controls execution of user programs (CPU) and I/O Operation (disk drive)

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

OS Kernel

A

Available to run at any time, stored in high memory, Used to boot program

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

How does OS do resource allocation

A

Partitions RAM and provides uniform interface for hardware

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

Explain early program systems

A

Batch mainframe system (hidden figures). Had a pool of jobs that were run sequentially. Minimal hardware and OS requirements.

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

Multiprogram Systems

A

More than one program could occupy memory at the same time. Required more security and OS intervention.

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

Hard-Real time

A

Hard limits that will make a system fail. I.e. Car engine not starting

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

Soft-Real time

A

Missed deadline will make the system utility decrease. E.g. Video lag

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

Interrupts

A

Hardware signal used to suspend execution of current running program. The program is suspended and CPU control is transferred to interrupt routine that is stored in the interrupt dispatch table.

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

How does CPU determine interrupt source?

A

Polling or vectored interrupts

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

Essential interrupt idea

A

THEY CAN OCCUR AT ANY TIME

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

Trap

A

Signal generated by software similar to an interrupt. Requests a service from OS by the program. E.g. Error from division by zero. Accessed through the trap dispatch table

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

How is kernel mode implemented

A

Bit in status register, 0 for not 1 for kernel mode

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

User mode

A

Used for executing programs

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

Kernel mode

A

Accessing hardware and CPU resources with privileged instructions. Processing traps and system requests.

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

Example of switching between kernel mode

A
  • Program runs
  • Interrupt signal
  • Program switches to kernel mode and OS memory
  • Program location is saved on the stack stored in OS memory
  • Interrupt routine is found and executed
  • Return statement for interrupt is called which includes code that returns the status bit back to user
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Memory Base register

A

Points to beginning of allocated memory

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

Memory limit register

A

Points to end of allocated memory

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

What happens when you try to access outside of allocated program memory

A

Trap is thrown

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

Cooperative Multitasking

A

Program calling the yield function if it knows it’ll be occupied. E.g. numerical calculations

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

Program timers

A

Timers with allocated time that, when exceeded, throws an interrupt to yield the CPU from the current running program. Also used to update current date and time.

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

Main OS activities

A

Create and destroy processes and their resources. Suspend and resume processes. Synchronize data sharing.

23
Q

I/O management

A

Hide devices behind drivers. Contains buffers, interfaces, and cache for devices

24
Q

Types of queues

A

Read queues, I/O queues

25
Main memory
CPU accessed memory
26
Secondary storage
Large and non-volatile. E.g. electronic disks and tapes
27
Cache
High speed memory between CPU and main memory
28
System Calls
Provide the user the capacity to invoke useful functionalities that they do not have the permission to use. Allows OS to take over using traps and execute command for them. E.g. file copy, command interpreter.
29
Command Interpreter
Accepts and executes commands from user. Typically in scripting languages like bash with graphical interfaces.
30
Program
Program in execution and all resources associated with this program, like memory, PC, input, open files, etc
31
Process layout
Stack at the top (that grows downwards). Unallocated in the middle. Data segment after (that grows up). Contains global variables at the bottom and heap in the top half for malloc. Text segment at the bottom with the machine code.
32
sbrk
Points to end of data segment
33
Allocated stack and stack pointer
Point to end of and current position on the stack
34
New State
When process first starts up. Loading the text and data segment into memory. Allocating stack, setting up terminal connection and I/O connection.
35
Ready Queue
Ready to execute
36
Running State
Process currently being executed by the CPU
37
Wait Queue
Waiting for I/O device. Program will free up the CPU for other processes. Will be stuck on queue until request is serviced.
38
Done State
Process finished running and resources are freed
39
Process Control Block
PCB is allocated for each process and sometimes each thread. Repository of information that varies for each process.
40
Elements in PCB
Queue Info, Process State, Schedule Info, Process ID, PC, Register states, Memory info, open files, accoutning
41
Queue information in PCB
Link pointers that places process on master list and specialized lists.
42
Process State in PCB
Integer to hold state. E.g. New, Ready, Wait
43
Schedule Info PCB
Process priority and credits
44
Process ID PCB
Integer that represents the process' UUID
45
PC PCB
Value of PC when process was running saved in kernel stack
46
Register PCB
Save register information at the time of interrupt
47
Memory PCB
Allocated memory to that program
48
Accounting PCB
Pay for use time saved
49
Context switch
When CPU switches between processes after an interrupt routine
50
Describe Context Switch
Process running. Interrupt occurs and interrupt service routine is entered. Save all PCB information (registers, time on CPU). Save PC onto kernel stack. Program put on ready or wait queue while interrupt routine occurs. Process 2's PCB gets pulled from the stack and it changes from ready to running. Restore process' state on the CPU and begin running.
51
Overhead
When the CPU is doing no meaningful work. E.g. context switch
52
I/O bound process
Interactive process that typically does mostly I/O. High priority
53
CPU Bound process
Process that does mostly computation. Low priority.