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
Q

Main memory

A

CPU accessed memory

26
Q

Secondary storage

A

Large and non-volatile. E.g. electronic disks and tapes

27
Q

Cache

A

High speed memory between CPU and main memory

28
Q

System Calls

A

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
Q

Command Interpreter

A

Accepts and executes commands from user. Typically in scripting languages like bash with graphical interfaces.

30
Q

Program

A

Program in execution and all resources associated with this program, like memory, PC, input, open files, etc

31
Q

Process layout

A

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
Q

sbrk

A

Points to end of data segment

33
Q

Allocated stack and stack pointer

A

Point to end of and current position on the stack

34
Q

New State

A

When process first starts up. Loading the text and data segment into memory. Allocating stack, setting up terminal connection and I/O connection.

35
Q

Ready Queue

A

Ready to execute

36
Q

Running State

A

Process currently being executed by the CPU

37
Q

Wait Queue

A

Waiting for I/O device. Program will free up the CPU for other processes. Will be stuck on queue until request is serviced.

38
Q

Done State

A

Process finished running and resources are freed

39
Q

Process Control Block

A

PCB is allocated for each process and sometimes each thread. Repository of information that varies for each process.

40
Q

Elements in PCB

A

Queue Info, Process State, Schedule Info, Process ID, PC, Register states, Memory info, open files, accoutning

41
Q

Queue information in PCB

A

Link pointers that places process on master list and specialized lists.

42
Q

Process State in PCB

A

Integer to hold state. E.g. New, Ready, Wait

43
Q

Schedule Info PCB

A

Process priority and credits

44
Q

Process ID PCB

A

Integer that represents the process’ UUID

45
Q

PC PCB

A

Value of PC when process was running saved in kernel stack

46
Q

Register PCB

A

Save register information at the time of interrupt

47
Q

Memory PCB

A

Allocated memory to that program

48
Q

Accounting PCB

A

Pay for use time saved

49
Q

Context switch

A

When CPU switches between processes after an interrupt routine

50
Q

Describe Context Switch

A

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
Q

Overhead

A

When the CPU is doing no meaningful work. E.g. context switch

52
Q

I/O bound process

A

Interactive process that typically does mostly I/O. High priority

53
Q

CPU Bound process

A

Process that does mostly computation. Low priority.