You are on page 1of 7

Operating Systems [Midterms]

Synchronization - Every process shares the file systems.


- uses atomic operations to ensure cooperation between threads.

- way of coordinating multiple concurrent activities.

Evil C Compiler - Modifies files behind your back by inserting errors.

💡 Non-deterministic errors are really difficult to find.

Threaded Web Server - Can share file caches kept in memory.

💡 Threads are much cheaper to create than processes.

Scheduler - Free to run threads.

Dispatcher - Choose to run each thread.

Atomic Operation - Operation always run to completion or not at all.

Hyperthreading - Possible to interleave threads on a per-instruction basis.

Operating Systems [Midterms] 1


Fundamental Building Block - No Atomic Operations = No threads to work together.

Threaded Programs - must work for all interleaving of thread instruction sequences.

Cooperating Threads - inherently non-deterministic and non-reproducible.

💡 PASS - Primary Avionics Software System

BFS - Backup Flight System

Space Shuttle has 5 computers.

Mutual Exclusion - ensures only one thread at a time.

💡 Mutual Exclusion can be called as MUTEX.

Mutual Exclusion also called “Binary Semaphore”.

Critical Section - piece of code. only one thread execute at once.

Lock - prevents someone from doing something.

Operating Systems [Midterms] 2


💡 Internal - relinquish the CPU.

External - To take CPU.

Nachos Code - will see lots of comments about assumptions made.

💡 Lock is free = test & set reads 0 and sets value = 1

Lock is busy = test & set reads 1 and sets value = 1

Busy-waiting - thread consumes cycle while waiting.

Semaphores - are a kind of generalized lock.

💡 “ P() “ means proberen or to test - decrements by 1.

” V() “ means verhogen or to increment - increments by 1.

Consumer - to fill buffers.

Producer - to empty buffers.

Condition Variable - a queue of threads waiting for something inside critical section.

Operating Systems [Midterms] 3


💡 Wait (&lock) - atomically release lock.

Signal() - Wake up one waiter.

Broadcast() - Wake up all waiters.

Hoare-style - Signalers gives lock.

Mesa-style - Signaler keeps lock.

Readers - access database when no writers.

Writers - access database when no readers or writers.

Monitors - represent the logic of the program.

💡 Languages that support exceptions are problematic.

Big Project - Time/work estimation is hard, Programmers are eternal optimistic.

Specifications - First document generated and the last one finished.

Project Objectives - goals, constraints, & priorities.

Operating Systems [Midterms] 4


Meetings Notes - Document all decisions, cut & paste the design documents.

Schedule - Anticipated Timing.

Organization Chart - Responsible for what task.

JUnit - Automate unit testing.

Unit tests - Check each module in isolation.

Daemons - Subject code to exceptional cases.

Random Testing - Subject code to random timing changes.

Resources - Passive entities needed by threads to do their work.

Preemptable - Can Take it away.

Non-preemptable - Must leave it with the thread.

💡 Read-only files are typically shareable.

Printers are not shareable.

Starvation - Thread waits indefinitely.

Operating Systems [Midterms] 5


Can end.

Deadlock - Circular waiting for resources.

Can’t end.

💡 Requirements for Deadlock

Mutual Exclusion - one thread at a time.

Hold and wait - holding at least one resource.

No preemption - resources are released only voluntarily.

Banker’s Algorithm - Allocate resources dynamically.

Execution Model - Programs alternate between bursts of CPU and I/O.

Throughput - related to response time, but not identical.

Fairness - Share CPU among users.

First-Come, First Served (FCFS) - One program scheduled until done.

Round Robin (RR) - Process gets a small unit of CPU time.

Shortest Job First (SJF) - arrives and has a shorter time to completion.

Operating Systems [Midterms] 6


Burst Time - Total Time taken by the process.

CPU Time - Time taken by the CPU to execute process.

I/O Time - Perform some I/O operations.

Arrival Time - Ready state, ready for an execution.

Exit Time - Process completes its execution.

Response Time - Time spent when the process is in the ready-state.

Waiting Time - Total time spent by the process in the ready state.

Turn-around Time - Total amount of time spent by the process form coming in the
ready-state.

Throughput - way to find efficiency of CPU.

Operating Systems [Midterms] 7

You might also like