OS Flashcards

1
Q

sharing resources across users/programs by taking turns(time share)

A

Multiplexing

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

sharing resources by dividing them up (space share)

A

Space multiplexing

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

_____ connects the CPU/memory/I/o devices

A

System bus

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

software that runs in kernel mode (mostly). It manages all the hardware and provides programmers an interface to manage hardware. They have a user mode and kernel mode

  • Processes
  • Memory management
  • I/o device management
A

Operating system (OS)

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

Processors (CPU) fetches instructions from memory and runs it. They have registers. Can execute more than one command at a time using a pipeline.

What are the 3 main steps that repeat?

A

-fetch
-decode
-execute

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

____ fetches instructions from memory and runs it

A

Processors

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

they store data locally to speed up processing

A

Registers

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

A type of register. memory address of next instruction to fetch

A

Program counter

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

(register) - points to the current stack in memory. Holds input parameters, local variables, and temp variables that are not kept in general registers.

A

Stack pointer

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

User programs run in ______ (which can only use a subset of the available instructions)

A

user mode

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

a user program makes a _______ ____ to invoke the OS

A

system call

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

____ allows the CPU to hold the state of different threads and switch back and forth at a nanosecond time scale

A

Hyperthreading

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

Memory Types
These are in order of fastest to slowest:

A
  1. Registers (no delay in access)
  2. Cache (L1/L2)
  3. Main memory
  4. SSD/hard drive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

____ _____ have a penalty of tens to hundreds of cycles when being accessed.

A

Cache misses

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

Which cache is faster? L1 or L2?

A

L1
is faster, but also much smaller in size (8 KB to 64 KB)
Located on the processor chip

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

______ a container holding all the info needed to run a program.

What are things are contained in it?

A

Process

Holds:

  • Address space (memory location where it can read/write)
  • Executable program, data, and its stack
  • Registers, program counter, stack pointer
  • Open files
  • Related processes
  • Outstanding alarms
17
Q

An array that holds info about each process

A

Process Table

18
Q

used to request that data is retransmitted over the network when a process doesn’t get a response

A

Alarm Signal

19
Q

___ are the software version of hardware interrupts

A

Signals

20
Q

Alarm Signal

A

used to request that data is retransmitted over the network when a process doesn’t get a response

21
Q

Memory that holds executing programs

A

Address Space

22
Q

___ is done when one program is moved out of the address space so another program can be moved there (to the main memory).

A

Swapping

23
Q

___ can connect two processes. Note that processes in the ___ expression may all be started at once, but they’ll be set to blocked until their input is ready

A

pipe

24
Q

_______ ___ are the file read write and execute numbers. Ex: 640

A

Protection bits

25
Q

Sh, csh, ksh, bash, zsh. These are each _____

A

shells

26
Q

Which call can use the kernel?

Procedure call or system call?

A

System calls

27
Q

A built-in bash command that is used to execute a command when the shell receives any signal is called a ___. It can respond to signals

A

trap

28
Q

List the name of some common signals

A

SIGINT - means a process was interrupted
SIGKILL/SIGTERM - a process was explicitly killed by the kill program
SIGCONT - If a process has been paused by sending it SIGSTOP then sending SIGCONT to the process wakes it up again
SIGXCPU- happens if a process exceedes it’s CPU limit

29
Q

Where is the L2 cache located?
How big is it?

A

On the mother board
Size: 256 KB to 16 MB

30
Q

The operating system has a _____ to run commands. Then it has a __ __ _____to return control to the program that needed the OS to do work. Note that these live in the kernal space.

A

dispatcher

sys call handler

31
Q

Portable Operating System Interface has 100 procedure calls

A

POSIX

32
Q

______
- Only way to creat a new process in posix
- Creates an exact duplicate of a process, including all files, descriptors, registers, etc.
- After that, changes to each process are independent
- Returns the PID (process id)

A

Fork

33
Q

____ __ _____
Two processes share a space in memory until a change is made, then a copy is created.

A

copy on write

34
Q

The ______ _____ contains these three segments:
- Text segment (code)
- Data segment (variables) (grows up)
- Stack (grows down)

A

processes memory

35
Q

What does L2 cache store?

A

It stores data and instructions that are not currently being accessed by the processor, but that may be needed in the near future

36
Q

Where is L1 cache located?

A

On the processor (CPU)