{ "@context": "https://schema.org", "@type": "Organization", "name": "Brainscape", "url": "https://www.brainscape.com/", "logo": "https://www.brainscape.com/pks/images/cms/public-views/shared/Brainscape-logo-c4e172b280b4616f7fda.svg", "sameAs": [ "https://www.facebook.com/Brainscape", "https://x.com/brainscape", "https://www.linkedin.com/company/brainscape", "https://www.instagram.com/brainscape/", "https://www.tiktok.com/@brainscapeu", "https://www.pinterest.com/brainscape/", "https://www.youtube.com/@BrainscapeNY" ], "contactPoint": { "@type": "ContactPoint", "telephone": "(929) 334-4005", "contactType": "customer service", "availableLanguage": ["English"] }, "founder": { "@type": "Person", "name": "Andrew Cohen" }, "description": "Brainscape’s spaced repetition system is proven to DOUBLE learning results! Find, make, and study flashcards online or in our mobile app. Serious learners only.", "address": { "@type": "PostalAddress", "streetAddress": "159 W 25th St, Ste 517", "addressLocality": "New York", "addressRegion": "NY", "postalCode": "10001", "addressCountry": "USA" } }

Midterm Flashcards

Learn material from first 5 weeks (141 cards)

1
Q

What is meant by a distributed system?

A

a group of computers working together as to appear as a single computer to the end-user.

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

What are the 4 main goals of a distributed system?

A
  1. Making resources accessible
  2. Distribution transparency
  3. Openness
  4. Scalability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the different types of transparency?

A
  1. Access transparency
  2. Location transparency
  3. Migration transparency
  4. Relocation transparency
  5. Replication transparency
  6. Concurrency transparency
  7. Failure transparency
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Hide differences in data representation and how a resource is accessed.

A

Access transparency

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

Hide where a resource is located.

A

Location transparency

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

Hide that a resource may move to another location.

A

Migration transparency

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

Hide that a resource may be moved to another location while in use.

A

Relocation transparency

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

Hide that a resource is replicated

A

Replication transparency

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

Hide that a resource may be shared by several competitive users.

A

Concurrency transparency

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

Hide the failure and recovery of a resource.

A

Failure transparency

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

A distributed system that is able to present itself to users and applications as if it were only a single computer system is said to be __________.

A

transparent

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

A(n) ___________ is a system that offers services according to standard rules that describe the syntax and semantics of those services.

A

open distributed system

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

Characterizes the extent by which two implementations of systems or components from different manufacturers can co-exist and work together, by merely relying on each other’s services as specified by a common standard.

A

Interoperability

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

Characterizes to what extent an application developed for a distributed system A can be executed, without modification, on a different distributed system B that implements the same interface as A.

A

Portability

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

The notion that it should be relatively easy to add parts that run on a different operating system, or even to replace an entire file system.

A

Extensibility

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

List the three dimensions by which scalability can be measured,

A
  1. size
  2. geographically
  3. administratively
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is meant by scalability of size?

A

We can easily add more users and resources to the system.

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

What is meant by geographic scalability?

A

A system in which the users and resources may be far apart.

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

What is meant by administrative scalability?

A

It can still be easy to manage even if it spans many independent administrative organizations.

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

What are three scaling techniques?

A
  1. hiding communication latency
  2. distribution
  3. replication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Trying to avoid waiting for a response to remote (and potentially distant) service requests as much as possible.

A

Hiding communication latency

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

This involves taking a component, splitting it into smaller parts, and subsequently spreading those parts across the system.

A

Distribution

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

Name one real-world example of distribution.

A

DNS tree of domains that are divided into non-overlapping zones.

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

This technique increases availability, but also helps to balance the load between components, leading to better performance.

A

Replication

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
________ is a special form of replication, which results in making a copy of a resource generally in the proximity of the client accessing the resource.
Caching
26
List the eight false assumptions that everyone makes when developing a distributed application for the first time.
1. The network is reliable 2. The network is secure 3. The network is homogeneous 4. The topology does not change 5. Latency is zero 6. Bandwidth is infinite 7. Transport cost is zero 8. There is one administrator
27
What are the three main types of distributed systems?
1. Distributed computing systems 2. Distributed information systems 3. Distributed pervasive systems
28
In ________ the underlying hardware consists of a collection of similar workstations or PCs, closely connected by means of high-speed local area network. In addition, each node runs the same operating system.
cluster computing
29
This subgroup consists of distributed systems that are often constructed as a federation of computer systems, where each system may fall under a different administrative domain, and may be very different when it comes to hardware, software and deployed network technology.
Grid computing
30
What are the two subtypes of distributed information systems?
1. Transaction processing systems | 2. Enterprise application integration (EAI)
31
What are the four characteristic properties that transactions have?
1. Atomic 2. Consistent 3. Isolated 4. Durable (ACID)
32
To the outside world, the transaction happens indivisibly.
Atomic
33
The transaction does not violate system invariants.
Consistent
34
Concurrent transactions do not interfere with each other.
Isolated
35
Once a transaction commits, the changes are permanent.
Durable
36
An application component that can effectively send a request to another application component by doing a local procedure call, which results in the request being packaged as a message and sent to the callee.
Remote procedure call (RPC)
37
Type of distributed system in which instability is the default behavior, often characterized by being small, battery-powered, mobile, and having only a wireless connection, although not all of these characteristics apply to all devices.
Distributed pervasive systems
38
What are the three requirements for a pervasive system?
1. Embrace contextual change 2. Encourage ad hoc composition 3. Recognize sharing as a default
39
________ form a collection of (fixed) nodes that communicate through wireless links. These networks may form the basis for many medium-scale distributed systems.
Mesh networks
40
A UNIX process is a(n) ________ of a program in execution.
instance
41
T/F: Each process has program code, data segment, program stack, etc.
True
42
What is the result of the following process? | $ ls | wc
Results in the shell creating two processes where the output of ls is sent (via the pipe) as in input to wc Output would be a count of the number of files in the directory
43
T/F: A single program can only spawn a single process.
False - a single program may spawn multiple processes.
44
What are the four basic mechanisms for creating processes in Unix?
1. fork 2. exec 3. wait 4. exit
45
Which unix mechanism creates a new process by duplicating the calling process?
fork
46
Which Unix mechanism performs the transformation of a process by overlaying its memory space with a new program?
exec
47
Which Unix mechanism provides the ability for a process to be halted while a related process finished?
wait
48
Which Unix mechanism is used to terminate a process?
exit
49
T/F: A fork is typically followed by an exec.
True
50
T/F: After fork and before exec, the per process values cannot be modified.
False
51
The name for a newly created process after a successful fork.
child process
52
The process that makes a fork call is called the _______.
parent process
53
T/F: After the system call is made successfully, both processes begin execution at the statement after the call to fork.
True
54
T/F: After a fork, the parent and child process have unique data and code segments.
False - they have identical data and code segments
55
fork() returns the _____________ of the newly created process to the parent.
process ID
56
fork() returns a ________ to the newly created process.
0 (zero)
57
What is one way of distinguishing a parent from a child?
Use the 0 as a comparison of process ID. Child processes receive a PID of 0 after a fork.
58
_____ replicates the calling process, _____ will create a new process and destroy the called process.
fork; exec
59
T/F: During an exec call, the new process will inherit the process ID of the called process.
True
60
Which call initiates a new program in the same environment in which it is operating?
execl()
61
Which routine will perform the same purpose as execl() except that it will use environment variable PATH to determine which executable to process?
execlp()
62
What does execv do?
This is the same as execl(), but the arguments are passed as a null terminated array of pointers to the char.
63
T/F: The call to wait() returns the process ID of the child process that exits.
True
64
T/F: If there are n child processes, n wait statements would be needed if the parent is to continue after all of the child processes have exited
True
65
________ provides an interface for programs that need to wait for certain child processes
waitpid
66
__________ returns the process ID of the child process once terminated.
waitpid
67
When does a process become a zombie?
When a child process exits before the parent process issues a wait(). This results in the process occupying space in the system's process table but nothing else.
68
If a parent process exits before a child process is done, that process is considered _________.
orphaned It is "adopted" by the OS (and killed!)
69
This program extracts individual tokens from the command line constructed by userin.
gettok.c
70
A lexical unit such as a command name or argument.
Token
71
This program will parse a command line using gettok, constructing an argument list in the process.
procline.c
72
T/F: procline.c assumes that an input has already been read with userin.
True
73
This program actually starts any command process.
runcommand.c
74
This program takes an additional parameter (where) to indicate if the process is to be run in the foreground or background.
runcommand.c
75
This part of the Kernel Data Structure contains an entry for every process in the system.
Process Table
76
This part of the Kernel Data Structure contains at least one entry for every open file in the system.
Open File Table
77
A process can send data 'down' a pipe using a ______ system call and another process can receive the data by using _____ at the other end.
write; read
78
What does the following command do? pr mydoc | lpr -Psunhp
A paginated version of the file mydoc sent to the sunhp printer
79
The pr program simply writes to the _______.
stdout
80
The lpr program simply reads the ______.
stdin
81
Regarding Pipes: Flow control is maintained automatically by the _______.
Operating System
82
A successful system call using pipe() returns which file descriptors?
1. One for writing down the pipe | 2. One for reading from the pipe
83
A two-integer array that will hold the file descriptors that will identify the pipe.
filedes
84
If successful, ________ will be open for reading from the pipe and ________ will be open for writing down it.
filedes[0]; filedes[1]
85
What is returned if a pipe cannot obtain the file descriptors?
-1
86
T/F: Pipes behave first-in-last-out, this cannot be changed.
False - first-in-first out (cannot be changed)
87
The size of read and write don't have to match. (Write 512k blocks, read 1 char)
True
88
When a process attempts a single write larger than the size of the pipe, the write is _________ until a read ensues.
suspended
89
T/F: If several processes write to the pipe at the same time, data can be intermingled.
True
90
If the pipe is empty and a process attempts to read, it is usually _______ until some data is placed in the pipe.
blocked
91
If all processes close their write-end of the pipe and the pipe is empty, any process attempting a read will return _______.
no data (will return 0 like EOF)
92
If all processes close their read-end of the pipe and there are processes waiting to write to the pipe, the kernel will send a _________ signal.
SIGPIPE
93
_________ can be used to prevent reads and writes from blocking.
fcntl
94
fcntl allows a process to set the __________ flag for a file des in order to prevent future reads and writes from blocking.
O_NONBLOCK
95
stderr has which file descriptor?
2
96
______ is a system call that makes newfd be the copy of oldfd
dup2
97
T/F: dup2 closes the file represented by it's second parameter before the assignment.
True
98
How does the join command work?
join will run both programs and pipe the stdout of com1 into the stdin of com2.
99
________ provide a simple programming interface which is consistent for processes on the same machine or across different machines.
Sockets
100
The aim of UNIX ________ is to provide a means of Inter process Communication that is sufficiently generic to allow bi-directional messages between two processes irrespective of where they reside.
sockets
101
What are the two ways in which processes that send messages across a network can communicate?
1. The connection oriented model (or virtual circuit.) | 2. The connectionless oriented model.
102
What type of communication model is the USPS? (Where we are not concerned that the clients get the message aka broadcast.)
Connectionless oriented model
103
UNIX uses _______ for connection oriented communication and _________ for connectionless oriented communication.
TCP; UDP
104
When processes are communicating across a network they must know the _____________ of the machine that the processes are residing on.
network address
105
What does a network address do?
It gives the physical location of a machine on a network.
106
At the programming level, IP addresses are stored in an ________ type.
in_addr_t
107
Which UNIX routine converts the four decinmal number representation to the in_addr_t representation?
inet_addr
108
The server process sets and listens for connections on a specified __________.
port number
109
T/F: A client process will ask for a connection to a specific machine and port.
True
110
These are handles used to establish a link between processes across a network.
transport end points
111
T/F: In all forms of communication, only the client needs to establish its own transport end point.
False - Both the client and server must establish their own transport end points.
112
Creation of transport end points is achieved using the ________ system call.
socket
113
In a socket system call: the ______ parameter tells the call where the socket is to be used.
domain
114
In a socket system call, which domain does AF_INET represent?
internet domain
115
In a socket system call, which domain does AF_UNIX represent?
same UNIX machine
116
In a socket system call, the ________ parameter specifies connection model.
type
117
In a socket system call, what represents a connection type model?
SOCK_STREAM (TCP)
118
In a socket system call, what represents a connectionless type model?
SOCK_DGRAM (UDP)
119
The ______ system call associates the true network address of a machine with a socket identifier.
bind
120
Which are the three parameters used with the bind system call?
sockid, sockaddr, size of the actual socket structure used
121
In a bind call, what does the sockid parameter represent?
The socket file descriptor, returned by the socket system call.
122
In a bind call, what does the sockaddr parameter represent?
A pointer to the sockaddr structure.
123
What does the listen system call do?
Allows the server to set itself up to wait for connections.
124
In a listen call, what are the two parameters?
int sockfd, int queue_size
125
In a listen call, what does the queue_size parameter represent?
It means the server can queue up to [queue_size] incoming connection requests.
126
T/F: When the server receives a connect request from a client, it has to create an entirely new socket to handle the specific communication.
True
127
In a connection request: the first socket is used to do what?
establish communication
128
In a connection request: the second socket is created how?
by an accept system call
129
What is the return value of an accept call?
the new socket id to be used for communication
130
What type of client call is used to request a connection to a server process and machine?
the connect system call
131
Which system calls are used for sending and receiving data in a stream?
read and write (or send and recv, if needed.)
132
What does a MSG_PEEK flag do?
Can look at the data with out actually 'receiving' it.
133
What does a MSG_OOB flag do?
Normal data is passed and the process only receives 'Out Of Bound' data, like signal (SIGINT)
134
What does a MSG_WAITALL flag do?
The recv call will only return when the full amount of data is available.
135
What does a MSG_DONTROUTE flag do?
The message will be sent, ignoring any routing conditions of the underlying protocol.
136
T/F: the close system call can be used on socket.
True
137
In a connectionless model, the packets transmitted between the client and server will arrive at their destination in ___________ order.
an indeterminate
138
What are the two system calls specific to the connectionless model?
sendto and recvfrom
139
T/F: recvfrom call works exactly the same way as recv if send_addr is set to NULL.
True
140
The ________ pointer is the buffer into which the received message will be placed.
message
141
T/F: In a connectionless model, the client must create a socket and bind its local address to that socket.
True