comsci Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

define interrupts

A

-CPU is fast, IO device and other services are slow
-CPU doesnt stop and wait
-When IO services are finished use interrupt to get CPUS attention

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

How is the modern OS interrupt Driven?

A

-With the interrupt vector.
-With the interrupt handler
- with soft interrupts like; traps and system calls

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

Why cant user interact with HW directly?

A

because of Mode bit and system calls

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

What is Mode bit?

A

-motivation
-user operation and kernel operation seperate but difficult to distinguish user or kernel
-Hardware support for system protection
-1 kernel operation
-0 user operation

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

What is a system call?

A

Interface between user and kernel
- All IO, Hardware, System calls are handled by the kernel
-Users must make systems calls to access any system resources

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

What is the 5 process transition diagram?

A
  • transition from waiting-> running, possible?
  • transition from running -> waiting?
    -transition from running -> ready?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the two types of concurrency?

A

-interloped which involves time shearing
-parallel which involves multiple CPUs

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

What is the PCB? WHere is it located?

A

Process control block located in the kernel

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

What does the PCB contain/handle?

A

-process ID
-Register values
-scheduling related info
-page table
-opened file info

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

What are the two types of scheduling?

A

Preemptive and non-preemptive

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

What is preemptive scheduling?

A

A process can be paused by the scheduler at any time during its execution

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

What is non-preemptive scheduling?

A
  • The process itself decides to give up the CPU when its computations are in a
    stable state
  • Scheduler doesn’t stop/pause process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the duty of the dispatcher?

A

switch between 2 user processes

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

What are the 5 scheduling algorithms?

A

FCFS, SJF, SRFJ, RR, Priority

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

What is race condition?

A

Race condition happens when two or more processes access and manipulate the same data concurrently and the outcome depends on the order of access (this is not desirable)

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

What is spin lock?

A

Also known as busy waiting, using polling to detect a certain condition even though the process doesnt do a meaningful job it is still in the running state, CPU is busy

17
Q

what could cause internal and external fragmentation respectivly?

A

external- “holes” in dynamic contiguous memory allocation(solution is compaction:)
internal - fixed contigous memory allocation, paging internal fragment < page size

18
Q

What is the dynamic contigous memory allocation strategy?

A

-first fit(fast)
-Best fit(try to maximize the utilization of free space, but easily create small holes)
-worst fit( try to reduce the small holes)

19
Q

How do we manage paging?

A

We keep a page table for each process.

20
Q

Where is the page table?

A

In the kernel within the PCB

21
Q

Does paging have external fragments?

A

No, paging is a solution to fragmentation.

22
Q

Does paging have internal fragments

A

Yes, but it is minimal.

23
Q

How does the OS keep track of free frames?

A

with the TlB(translation look aside buffer)

24
Q

Why does the paging system have a speed issue?

A

Sometimes it can grow to be too large.

25
Q

What is the formula to find logical address?

A

Pgae number + offsets