Exam 1 Flashcards

1
Q

PID

A

Process ID

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

GID

A

Group ID

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

UID

A

User ID

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

TSL

A

Test and Set Lock

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

process

A

a program in execution

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

daemon

A

a background process

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

child process

A

a process created by another process

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

multiprogramming

A

when multiple processes are running

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

multiprocessing

A

when multiple CPUs are running processes

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

race condition

A

two or more processes want to modify a shared resource at the same time and the result depends who runs when

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

quantum

A

the amount of time before a clock interrupt preempts a process

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

critical section

A

when the program is accessing the shared data

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

atomic action

A

a single check, change, and possible sleep action

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

spin lock

A

a lock that uses busy waiting

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

system call

A

trapping into the kernel and invoking the operating system

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

throughput

A

the number of jobs per hour the system completes

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

turnaround time

A

the averaged time from the moment a job is submitted to the time that it is completed in a batch setup

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

preemptive scheduling

A

selects a process to run for a set amount of time and after that time if the process is still running it is suspended and another process is allowed to run

19
Q

context switch

A

switching from one program to another

20
Q

thread

A

a lightweight process

21
Q

what are the two main functions of an operating system

A
  • an extended machine

- a resource manager

22
Q

What hardware characteristics distinguish between the 4 generation of computers?

A

vacuum tubes, transistors, ICs, PCs

23
Q

What is the memory hierarchy? Why do computer systems use a memory hierarchy?

A

registers, cache, main memory, disk drives, tape drives

the higher in the hierarchy the faster the access but the more it costs

24
Q

Why are system calls necessary? What does the fork system call accomplish?

A
  • system calls protect from allowing the user to cause avoidable damage to the system
  • creates a child process
25
Q

Which of the following instructions should be allowed only in kernel mode? a) disable all interrupts b) read the time-of-day clock c) set the time-of-day clock d) change the memory map

A

a, c, d

26
Q

What is a virtual machine?

A

allows multithreading on a machine that doesn’t support it

27
Q

List some items that might be found in a process table.

A

Registers, Program counter, Stack Pointer, Priority, GID, UID, PID, PPID, group, time used

28
Q

What are the three process states and four transitions that were discussed in the book? You should be able to reproduce the figure that represents the three process states and four transitions.

A
  • ready, running, blocked

- blocked for input, scheduler picks a process, scheduler picks this process, input becomes available

29
Q

what advantages are there in using threads rather than multiple processes

A

more can be accomplished at once, faster program speeds, virtualization

30
Q

list two examples of applications that are commonly implemented using threads

A
  • web server

- word processor

31
Q

what are the advantages and disadvantages are there in implementing threads in user space as opposed to kernel space

A

advantage: more usage of the quantum
disadvantage: less fair to the other processes

32
Q

which is easier: blocking system call or non-blocking system call

A

blocking system call

33
Q

list four functions defined by the Pthread standard

A

create, exit, join, yield

34
Q

what four conditions are needed to avoid race conditions

A
  1. no tow processes may be simultaneously inside their critical regions
  2. No assumptions may be made about speeds or the number of CPUs
  3. No process running outside its critical region may block other processes
  4. No process should have to wait forever to enter its critical region
35
Q

what were the problems with the four unsuccessful attempts to implement mutual exclusion functions?

A

?

36
Q

what two functions are implemented by an operating system that supports semaphores?

A

up and down

37
Q

what is a binary semaphore

A

a semaphore that can have only one of two values

38
Q

why don’t we use the monitor system call in every application that needs to implement mutual exclusion

A

monitor doesn’t work in machines with more than one CPU

39
Q

what mechanism is used to avoid race conditions with multiple CPUs

A

Message Passing

40
Q

what are six goals that could be used in designing a good scheduling algorithm

A
  • fairness
  • policy enforcement
  • balance
  • throughput
  • response time
  • meeting deadlines
41
Q

List three scheduling algorithms that could be used for a batch-oriented system

A
  • throughput
  • turnaround time
  • CPU utilization
42
Q

List three scheduling algorithms that could be used for an interactive-oriented system

A

response time
proportionality
balance

43
Q

dining philosophers problem

A

an example of deadlock issue