Section 1

Preview this deck

In a 32/64 bit Linux system on an x86 processor, the user default space is...

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

7 years ago

Date created

Mar 1, 2020

Cards (61)

Section 1

(50 cards)

In a 32/64 bit Linux system on an x86 processor, the user default space is...

Front

3 GB/128 TB

Back

What is channel 1?

Front

stdout

Back

hardware state for threads

Front

the kernel initializing and saving registers and CPU state

Back

wait(sem)

Front

an attempt by the caller to decrement the semaphore counter by 1. If the counter is non-zero, the call will succeed and return immediately to the called, leaving the semaphore counter decremented by 1. If the value of the semaphore counter is already zero, then the calling thread will be placed on the semaphore block queue, and is forced to yield its core to some other thread. Also known as p(sem) and down(sem)

Back

How many frames in 32/64 bit modes? Show math

Front

32 bit mode: 2^32 / 2^12 = 2^20 = 1M frames 64 bit mode: 2^48 / 2^12 = 2^36 = 64G frames

Back

How will the address space change if the process adds two more threads?

Front

Two new stacks would be mapped to the address space

Back

A process cannot exist unless its address space is populated by at least...

Front

the three areas of address space (text, data, and stack)

Back

address space for processes

Front

a contiguous collection of byte locations, some of which are populated by some form of contiguous memory object

Back

spinlock

Front

Mutual exclusion mechanism in which a process executes in an infinite loop waiting for the value of a lock variable to indicate availability

Back

Peterson's algorithm

Front

Allows simultaneous execution of two threads, where when it's one threads "turn" to go, the other thread is released from the while loop.

Back

signal state for threads

Front

Ability for thread to selectively block certain synchronous signals

Back

PID 1

Front

systemd (formally init)

Back

system call

Front

An instruction that interrupts the program being executed and requests a service from the operating system.

Back

Total Order Problems are solved using

Front

event counters and sequencers

Back

Single operation of sequencers

Front

int my_tix = ticket(seq);

Back

Sequencers

Front

Sequencers are always initialized to zero, and will return zero to the first thread that makes the ticket() call, while subsequent calls will return monotonically increasing integers (ie. 1, 2, 3, ... , etc.) which may eventually roll from positive to negative and back

Back

timesharing

Front

A system in which CPU time is shared among multiple interactive users at the same time

Back

producer

Front

The producer's job is to generate data, put it into the buffer, and start again

Back

Initial Thread

Front

When a new process is created, it is populated by exactly one executable thread. The IT of a process can create new threads only within its own process

Back

PID 2

Front

kthreadd

Back

A process must have a ________________ loaded at all times

Front

executable program

Back

consumer

Front

the consumer is consuming the data (i.e., removing it from the buffer), one piece at a time

Back

software state for threads (three modes)

Front

-running in either kernel or user mode -blocking/waiting or ready -ready/waiting or running

Back

At the lowest memory management level, an address space is a set of...

Front

virtual page frames

Back

threads

Front

The execution units (elements of code that can be scheduled to a processor)

Back

name four blocking mechanisms

Front

-semaphores -event counters and sequencers -pthread mutex locking -pthread condition variables

Back

UID and GID

Front

User Identifier and Group Identifier

Back

The Observer Reporter Problem

Front

an observer thread and a reporter thread must keep their counter use coherent using a single pthread mutex

Back

What is channel 2?

Front

stderr

Back

What happens if the last thread in a process terminates?

Front

The process itself must terminate

Back

Two basic functions of an event counter

Front

- await(EC, int value); - advance(EC);

Back

process

Front

the unit of management in most contemporary Operating Systems such as Windows and Linux/UNIX

Back

signal(sem)

Front

operation is an attempt by the caller to increment the semaphore counter by 1. The call will always succeed and return to the caller. If the counter is non-zero, then there are no waiters, and the calling thread simply increments the semaphore counter by 1 and returns.If the value of the semaphore counter is zero, then the calling thread will check to see if there are any waiters. Also known as v(sem) and up(sem)

Back

deadlock

Front

when two or more threads of control are blocked, each waiting on a resource held by the other thread

Back

semaphores can be logically decomposed into which two mechanisms?

Front

an event counter mechanism and a sequencer mechanism

Back

await(EC, int value)

Front

if value > EC then block and yield core; else return immediately;

Back

What is channel 0?

Front

stdin

Back

producer-consumer problem

Front

The problem is to make sure that the producer won't try to add data into the buffer if it's full and that the consumer won't try to remove data from an empty buffer.

Back

A process can change its executable program if one of its threads makes the system call ______________

Front

execve() (or execl()/execlp())

Back

A 4 GB address space is split between...

Front

3 GB user private space and 1 GB shared kernel

Back

PID 0

Front

a kernel process, and is not visible from user space

Back

three mutex (mutual exclusion) lock support provided by pthread library

Front

pthread_mutex_t pthread_mutex_lock(pthread_mutex_t *) pthread_mutex_unlock(pthread_mutex_t *)

Back

total ordering

Front

Ordering relationship in which all elements can be compared to each other.

Back

Event Counter

Front

monotonic counters that are always initialized to zero, and a waiting queue (as for a semaphore)

Back

The number of page frames in an address space depends on...

Front

the address mode, or the current "bit system" you're in

Back

When a process is populated by more than one thread, the co-existing threads may require...

Front

synchronization

Back

Partial Order Problems are solved using

Front

only event counters

Back

partial ordering

Front

Ordering relationship where for certain pairs of elements in the set, one of the elements precedes the other in the ordering

Back

semaphores

Front

constructs that logically consist of a counter and a waiting queue

Back

three areas of address space

Front

text, data, and stack

Back

Section 2

(11 cards)

What does HPF/RR stand for?

Front

Highest Priority First/Round Robbin

Back

A real time thread is created with...

Front

• A priority • Possibly an execution time slice (quantum) • A list of cores upon which it can run (affinity attributes)

Back

What conditions may we not be able to proceed once we obtain a mutex? Why?

Front

Ring buffer because we must obtain the mutex before we can manipulate the space counter

Back

Priorities are organized by...

Front

policies

Back

A timesharing thread is created with...

Front

• A priority • An execution time slice (quantum) • A list of cores upon which it can run (affinity attributes)

Back

three condition variable supported by pthread library

Front

pthread_cond_t pthread_cond_wait(pthread_cond_t , pthread_mutex_t ) pthread_cond_signal(pthread_cond_t *)

Back

condition variable

Front

allows a thread to block itself if the condition it needs to proceed is not currently available

Back

NICE values

Front

only on timeshare, the more negative the number the higher the priority

Back

Two thread scheduling policies

Front

Timesharing and Real Time

Back

Priority values are between... (give range/breakdown range)

Front

0-139, 0-39 are normal timesharing while 40-139 are real time

Back

Threads that are scheduled with real-time policies like the POSIX FIFO policy are generally treated differently than time-sharing (TS) threads in two ways. First, their priorities are generally always higher than any TS thread (they start off at a higher number than the highest possible TS thread). What is the second major difference in the way the system treats such threads ?

Front

The Operating System does NOT do Dynamic Priority Adjustment (Aging)

Back