CSC 330 - Final Exam Flashcards

1
Q

Describe different system architectures such as multiprocessor systems, multicomputer systems, and distributed systems and how different from single processor system (Know all 3)

A

Multiprocessor systems - have a separate CPU and a shared memory system. They have multicore chips that abide by Moore’s Law (the number of transistors on a chip doubles every two years). In the Multiprocessor OS, each CPU shares the operating system code, but has its own operating system data structures.

Multicomputer systems - a cluster of computers and workstations (a stripped down PC and a high performance network). The communication between nodes is critical. It is a way of parallel computing. It has load balancing that uses heuristic based processor allocation algorithms.

Distributed systems - a collection of full computers that can be spread over a widespread area ex: World Wide Web

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

Describe methods used to protect critical sections of code (Only need to know 1)

A

Semaphores are integer variables. They can be binary semaphores (which have a value of 0 or 1) or counting semaphores (which can have any integer value). They are manipulated with two atomic operations – Wait (P) and Signal (V).
• Wait – If the semaphore value is greater than 0, decrement it and continue. If the semaphore value is 0, wait until it becomes 1, decrement it and continue.
• Signal – Add 1 to the value of the semaphore.

Monitors are programming language constructs that implement mutual exclusion; they are an encapsulation of data and methods that manipulate the data. Only one process can be executing a monitor method at any time. If a process is in the monitor and another calls one of the methods, the second process will be suspended until the first process completes. Processes inside the monitor must leave the monitor before doing anything that will cause a suspend. Monitors are more reliable than semaphores because the compiler handles the mutual exclusion.

Message Passing - communication and synchronization commands
• send(destination, message)
• receive(source, message).
Both commands can have blocking and non blocking versions. The destination can allow broadcasting to all processes. The source can be set to accept messages from any process

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

Describe priority-based scheduling methods (Need To Know, specifically dynamic based)

A

Priority Scheduling is a preemptive method. A priority is assigned to each type of process. Processes are queued based on decreasing priority. Highest priority processes are given CPU time and will be interrupted if a higher priority process arrives. Interrupted processes will return to the end of the queue. A priority can be static or dynamic; static priorities do not change but dynamic processes can be changed to help reduce problems (like aging). Priorities favor processes that are behaving properly.

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

Describe processes (Learn definition)

A

An instance of an executing program; a dynamic entity in a system because it exhibits behavior (state changes) and is capable of carrying out computational activity. They are created at system startup, by another process, by the user or by a batch job. Differently they are terminated by a normal exit, an error exit, a fatal error or by another process. There are two types of processes - user and system processes. A data structure called a process descriptor is created for each process in a system. This is where the OS stores all data about a process.

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

Describe threads (Need to know)

A

Multiple flows of control within a process. They can be considered mini-processes or lightweight processes. They allow computing and I/O to overlap and they also allow a balanced workload. The Process Manager is in charge of swapping out the threads.

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

List and fully explain the four necessary and sufficient conditions for deadlock (Only mutual exclusion)

A

Mutual Exclusion – Each resource is available or allocated to exactly one process

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

Describe the purpose of common MPI functions that handle the sending, receiving, and broadcasting of messages (What is send and receive and what is tag used for?) (How is broadcast different from send and receive?)

A

The MPI Broadcast function is used for performing collective data distribution tasks. It will broadcast (send and receive) a message to all other processes.

MPI Send and MPI Receive are communication routines. They provide the transfer of information between processes. The Send function will send messages to other processes and the Receive function will receive a message from sending processes.

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

Describe the use of rank to determine what parts of the code are executed by which processes (Asked something bout rank)

A

A rank will be assigned to each processor in a cluster – starting at zero for the head processor/node. It will be incremented by one for all the other processors in the cluster. Having this rank is a way of identifying the processors in the cluster. It can be concluded which processor executed particular parts of code, which processor sent a message and which processor broadcasted a message.

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

Describe the relationship between process address space and physical memory(Need to KNOW!)

A

Process address space is the set of logical addresses that a process references in its code. The OS provides a mechanism that maps the logical address to physical addresses. When memory is allocated to the process, its set of logical addresses will be bound to physical addresses. The physical address is the final address generated when a program is loaded and ready to execute in physical memory.

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

Describe what pages and page frames are (Need to Know)

A

Pages: chunks of process address space; small fixed-sized blocks of logical memory.

Page frames: chunks of memory; small fixed-sized blocks of physical memory

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

Describe first in first out page replacement algorithm (Need to Know)

A

When pages are added to memory they are also added to the end of a list. When space is needed, the system removes the first page on the list. The page removed is the one that has been in memory the longest.

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

Describe methods of user authentication (Know entire thing)

A

Authentication is verifying that someone is who they say they are. The general methods methods are:
• Something you know
• Something you have
• Something about you

Passwords are something you know and can be selected by a user or a system. The problems with passwords:
• If a user selects it, there can be a dictionary attack.
• If the system selects it, it may not be easily guessed but the user won’t be able to memorize it and will have to write it down.

Data Media is something you have. It combines something with a password – ex. ATM card with a PIN. These can be lost, stolen or forged.

Biometrics are something about you and cannot be lost or stolen. Some examples would be: fingerprints, retinal scan, facial recognition and voice recognition.

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

Describe system vulnerabilities: social engineering, Trojan horses, spyware, trap doors, buffer and stack overflow, viruses (Only need to know social engineering)

A

Social engineering: an attempt made by an attacker to impersonate a trusted individual in order to convince someone to disclose confidential information. Two common examples:
• Phishing – sending out an email that appears to be from a trusted source asking for user action
• Pretexting – making a phone call posing as someone else asking for confidential information

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

Describe the structure of simple (integers, floats, characters, etc.) and complex (arrays, records, strings, etc.) and how these items could be laid out in memory (NEED TO KNOW)(Why are integers, Booleans characters considered primitive types?) (Why are complex things like arrays and records considered complex?) has something to do with memory (What are the two ways that a 2d array can be stored in memory?)(Difference between how an array and struct are layed out in memory) struct is recored type h

A

Integer - almost an exact reflection of the hardware so mapping is trivial. Can be as many as 8 different integer types in a language depending on the number of bytes used.

Boolean - could be implemented as bits, but often as bytes.

Character - stored as numeric codings. Most commonly used coding: ASCII. An alternative – 16-Bit coding (Unicode)

Float - model real numbers, but only as approximations. Languages support at least float and double, possibly quad.

String- values are stored as an array of characters. Some layouts begin with a count of the number of characters. Other layouts use a special character for termination.

1D Array - occupies successive locations of memory. Access function maps subscript expressions to an address in the array.

2D Array - values stored in one dimensional memory in row major order (by rows) or in column major order (by columns).

Record types - combines multiple data fields that can be of different types. Fields are stored in sequential memory locations.

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

Describe race conditions

A

Race conditions: when two or more processes attempt to share the same resource simultaneously. The process that writes to the resource last will succeed.

Example:
• Process A reads variable X and stores it in variable Y
• Process B reads variable X and stores it in variable Z
• Process A updates Y and stores it back into X
• Process B updates Z and stores it back into X
• Process B wins

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

Describe critical sections

A

Critical sections: the code in a process that accesses and uses a shared resource. Every process that needs to access a shared resource has its own critical section. It is a technique to avoid race conditions. There are four conditions for a proper solution:
• Only one process can be executing its critical section at a time (mutual exclusion)
• No assumptions can be made about speed or number of CPUs for the entire system
• No process outside a critical section can block another process
• No process should have to wait indefinitely to enter its critical section