Midterm Flashcards

Learn material from first 5 weeks

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
Q

________ 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.

A

Caching

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

List the eight false assumptions that everyone makes when developing a distributed application for the first time.

A
  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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What are the three main types of distributed systems?

A
  1. Distributed computing systems
  2. Distributed information systems
  3. Distributed pervasive systems
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

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.

A

cluster computing

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

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.

A

Grid computing

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

What are the two subtypes of distributed information systems?

A
  1. Transaction processing systems

2. Enterprise application integration (EAI)

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

What are the four characteristic properties that transactions have?

A
  1. Atomic
  2. Consistent
  3. Isolated
  4. Durable
    (ACID)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

To the outside world, the transaction happens indivisibly.

A

Atomic

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

The transaction does not violate system invariants.

A

Consistent

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

Concurrent transactions do not interfere with each other.

A

Isolated

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

Once a transaction commits, the changes are permanent.

A

Durable

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

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.

A

Remote procedure call (RPC)

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

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.

A

Distributed pervasive systems

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

What are the three requirements for a pervasive system?

A
  1. Embrace contextual change
  2. Encourage ad hoc composition
  3. Recognize sharing as a default
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

________ form a collection of (fixed) nodes that communicate through wireless links. These networks may form the basis for many medium-scale distributed systems.

A

Mesh networks

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

A UNIX process is a(n) ________ of a program in execution.

A

instance

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

T/F: Each process has program code, data segment, program stack, etc.

A

True

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

What is the result of the following process?

$ ls | wc

A

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

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

T/F: A single program can only spawn a single process.

A

False - a single program may spawn multiple processes.

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

What are the four basic mechanisms for creating processes in Unix?

A
  1. fork
  2. exec
  3. wait
  4. exit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

Which unix mechanism creates a new process by duplicating the calling process?

A

fork

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

Which Unix mechanism performs the transformation of a process by overlaying its memory space with a new program?

A

exec

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

Which Unix mechanism provides the ability for a process to be halted while a related process finished?

A

wait

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

Which Unix mechanism is used to terminate a process?

A

exit

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

T/F: A fork is typically followed by an exec.

A

True

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

T/F: After fork and before exec, the per process values cannot be modified.

A

False

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

The name for a newly created process after a successful fork.

A

child process

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

The process that makes a fork call is called the _______.

A

parent process

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

T/F: After the system call is made successfully, both processes begin execution at the statement after the call to fork.

A

True

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

T/F: After a fork, the parent and child process have unique data and code segments.

A

False - they have identical data and code segments

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

fork() returns the _____________ of the newly created process to the parent.

A

process ID

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

fork() returns a ________ to the newly created process.

A

0 (zero)

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

What is one way of distinguishing a parent from a child?

A

Use the 0 as a comparison of process ID. Child processes receive a PID of 0 after a fork.

58
Q

_____ replicates the calling process, _____ will create a new process and destroy the called process.

A

fork; exec

59
Q

T/F: During an exec call, the new process will inherit the process ID of the called process.

A

True

60
Q

Which call initiates a new program in the same environment in which it is operating?

A

execl()

61
Q

Which routine will perform the same purpose as execl() except that it will use environment variable PATH to determine which executable to process?

A

execlp()

62
Q

What does execv do?

A

This is the same as execl(), but the arguments are passed as a null terminated array of pointers to the char.

63
Q

T/F: The call to wait() returns the process ID of the child process that exits.

A

True

64
Q

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

A

True

65
Q

________ provides an interface for programs that need to wait for certain child processes

A

waitpid

66
Q

__________ returns the process ID of the child process once terminated.

A

waitpid

67
Q

When does a process become a zombie?

A

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
Q

If a parent process exits before a child process is done, that process is considered _________.

A

orphaned

It is “adopted” by the OS (and killed!)

69
Q

This program extracts individual tokens from the command line constructed by userin.

A

gettok.c

70
Q

A lexical unit such as a command name or argument.

A

Token

71
Q

This program will parse a command line using gettok, constructing an argument list in the process.

A

procline.c

72
Q

T/F: procline.c assumes that an input has already been read with userin.

A

True

73
Q

This program actually starts any command process.

A

runcommand.c

74
Q

This program takes an additional parameter (where) to indicate if the process is to be run in the foreground or background.

A

runcommand.c

75
Q

This part of the Kernel Data Structure contains an entry for every process in the system.

A

Process Table

76
Q

This part of the Kernel Data Structure contains at least one entry for every open file in the system.

A

Open File Table

77
Q

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.

A

write; read

78
Q

What does the following command do?

pr mydoc | lpr -Psunhp

A

A paginated version of the file mydoc sent to the sunhp printer

79
Q

The pr program simply writes to the _______.

A

stdout

80
Q

The lpr program simply reads the ______.

A

stdin

81
Q

Regarding Pipes: Flow control is maintained automatically by the _______.

A

Operating System

82
Q

A successful system call using pipe() returns which file descriptors?

A
  1. One for writing down the pipe

2. One for reading from the pipe

83
Q

A two-integer array that will hold the file descriptors that will identify the pipe.

A

filedes

84
Q

If successful, ________ will be open for reading from the pipe and ________ will be open for writing down it.

A

filedes[0]; filedes[1]

85
Q

What is returned if a pipe cannot obtain the file descriptors?

A

-1

86
Q

T/F: Pipes behave first-in-last-out, this cannot be changed.

A

False - first-in-first out (cannot be changed)

87
Q

The size of read and write don’t have to match. (Write 512k blocks, read 1 char)

A

True

88
Q

When a process attempts a single write larger than the size of the pipe, the write is _________ until a read ensues.

A

suspended

89
Q

T/F: If several processes write to the pipe at the same time, data can be intermingled.

A

True

90
Q

If the pipe is empty and a process attempts to read, it is usually _______ until some data is placed in the pipe.

A

blocked

91
Q

If all processes close their write-end of the pipe and the pipe is empty, any process attempting a read will return _______.

A

no data (will return 0 like EOF)

92
Q

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.

A

SIGPIPE

93
Q

_________ can be used to prevent reads and writes from blocking.

A

fcntl

94
Q

fcntl allows a process to set the __________ flag for a file des in order to prevent future reads and writes from blocking.

A

O_NONBLOCK

95
Q

stderr has which file descriptor?

A

2

96
Q

______ is a system call that makes newfd be the copy of oldfd

A

dup2

97
Q

T/F: dup2 closes the file represented by it’s second parameter before the assignment.

A

True

98
Q

How does the join command work?

A

join will run both programs and pipe the stdout of com1 into the stdin of com2.

99
Q

________ provide a simple programming interface which is consistent for processes on the same machine or across different machines.

A

Sockets

100
Q

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.

A

sockets

101
Q

What are the two ways in which processes that send messages across a network can communicate?

A
  1. The connection oriented model (or virtual circuit.)

2. The connectionless oriented model.

102
Q

What type of communication model is the USPS? (Where we are not concerned that the clients get the message aka broadcast.)

A

Connectionless oriented model

103
Q

UNIX uses _______ for connection oriented communication and _________ for connectionless oriented communication.

A

TCP; UDP

104
Q

When processes are communicating across a network they must know the _____________ of the machine that the processes are residing on.

A

network address

105
Q

What does a network address do?

A

It gives the physical location of a machine on a network.

106
Q

At the programming level, IP addresses are stored in an ________ type.

A

in_addr_t

107
Q

Which UNIX routine converts the four decinmal number representation to the in_addr_t representation?

A

inet_addr

108
Q

The server process sets and listens for connections on a specified __________.

A

port number

109
Q

T/F: A client process will ask for a connection to a specific machine and port.

A

True

110
Q

These are handles used to establish a link between processes across a network.

A

transport end points

111
Q

T/F: In all forms of communication, only the client needs to establish its own transport end point.

A

False - Both the client and server must establish their own transport end points.

112
Q

Creation of transport end points is achieved using the ________ system call.

A

socket

113
Q

In a socket system call: the ______ parameter tells the call where the socket is to be used.

A

domain

114
Q

In a socket system call, which domain does AF_INET represent?

A

internet domain

115
Q

In a socket system call, which domain does AF_UNIX represent?

A

same UNIX machine

116
Q

In a socket system call, the ________ parameter specifies connection model.

A

type

117
Q

In a socket system call, what represents a connection type model?

A

SOCK_STREAM (TCP)

118
Q

In a socket system call, what represents a connectionless type model?

A

SOCK_DGRAM (UDP)

119
Q

The ______ system call associates the true network address of a machine with a socket identifier.

A

bind

120
Q

Which are the three parameters used with the bind system call?

A

sockid, sockaddr, size of the actual socket structure used

121
Q

In a bind call, what does the sockid parameter represent?

A

The socket file descriptor, returned by the socket system call.

122
Q

In a bind call, what does the sockaddr parameter represent?

A

A pointer to the sockaddr structure.

123
Q

What does the listen system call do?

A

Allows the server to set itself up to wait for connections.

124
Q

In a listen call, what are the two parameters?

A

int sockfd, int queue_size

125
Q

In a listen call, what does the queue_size parameter represent?

A

It means the server can queue up to [queue_size] incoming connection requests.

126
Q

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.

A

True

127
Q

In a connection request: the first socket is used to do what?

A

establish communication

128
Q

In a connection request: the second socket is created how?

A

by an accept system call

129
Q

What is the return value of an accept call?

A

the new socket id to be used for communication

130
Q

What type of client call is used to request a connection to a server process and machine?

A

the connect system call

131
Q

Which system calls are used for sending and receiving data in a stream?

A

read and write (or send and recv, if needed.)

132
Q

What does a MSG_PEEK flag do?

A

Can look at the data with out actually ‘receiving’ it.

133
Q

What does a MSG_OOB flag do?

A

Normal data is passed and the process only receives ‘Out Of Bound’ data, like signal (SIGINT)

134
Q

What does a MSG_WAITALL flag do?

A

The recv call will only return when the full amount of data is available.

135
Q

What does a MSG_DONTROUTE flag do?

A

The message will be sent, ignoring any routing conditions of the underlying protocol.

136
Q

T/F: the close system call can be used on socket.

A

True

137
Q

In a connectionless model, the packets transmitted between the client and server will arrive at their destination in ___________ order.

A

an indeterminate

138
Q

What are the two system calls specific to the connectionless model?

A

sendto and recvfrom

139
Q

T/F: recvfrom call works exactly the same way as recv if send_addr is set to NULL.

A

True

140
Q

The ________ pointer is the buffer into which the received message will be placed.

A

message

141
Q

T/F: In a connectionless model, the client must create a socket and bind its local address to that socket.

A

True