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

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).

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

24
Q

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

A

Protection bits

25
Sh, csh, ksh, bash, zsh. These are each _____
shells
26
Which call can use the kernel? Procedure call or system call?
System calls
27
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
trap
28
List the name of some common signals
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
Where is the L2 cache located? How big is it?
On the mother board Size: 256 KB to 16 MB
30
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.
dispatcher sys call handler
31
Portable Operating System Interface has 100 procedure calls
POSIX
32
______ - 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)
Fork
33
____ __ _____ Two processes share a space in memory until a change is made, then a copy is created.
copy on write
34
The ______ _____ contains these three segments: - Text segment (code) - Data segment (variables) (grows up) - Stack (grows down)
processes memory
35
What does L2 cache store?
It stores data and instructions that are not currently being accessed by the processor, but that may be needed in the near future
36
Where is L1 cache located?
On the processor (CPU)