Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 7 pages
Exam (elaborations)

CSCI 1730 FINAL (LAMARCA) QUESTIONS

Document preview thumbnail
Preview 2 out of 7 pages

CSCI 1730 FINAL (LAMARCA) QUESTIONS

Content preview

CSCI 1730 FINAL (LAMARCA) QUESTIONS


What is concurrency? State some different examples of concurrency in systems
programming. - Answer -concurrency - when two or more3 things are executing at the
same time. Examples of concurrency - bash, operating system, emacs, user programs,
signals, pipes, File I/O, and sockets.

How does a C programmer write a single program that can exhibit concurrent behavior?
What system calls are involved in creating a process that exhibit concurrent behavior? -
Answer -the user can call fork or use a pthread in a single program. System calls: fork()
and pthread()

What is IPC? How does IPC relate to systems programming and concurrency? -
Answer -IPC - inter-process communication. It allows the programmer to coordinate
activities among various program processes which can run concurrently in a OS

What system calls are used in network IPC and concurrency? - Answer -system calls:
socket(), bind(), listen(), accept(), connect(), send(), recv(), close()

What is a thread? Why is a thread also called a lightweight process? - Answer -A
thread is a way for a program to divide into itself into two or more simultaneously
running tasks. Sometimes called lightweight processes because they have their own
stack but can access shared data.

what is the difference between a multi-threaded process and a process that forks into a
child and parent process? - Answer -Threading runs multiple line of execution
intraprocesses. Forking is a means of creating new processes.

What system calls are associated with pthreads? - Answer -system calls:
pthread_self(), pthread_equal(), pthread_create(), pthread_exit(), pthread_join(),

what is a signal handler and when are they used? - Answer -signal handler - a function
which is called when the target environment when the corresponding signal occurs

what system calls are associated with sockets? - Answer -system calls:

what is an active participant? - Answer -client

what is a passive participant? - Answer -server

What system calls does a passive participant typically call that an active participant may
not typically call. - Answer -listen() and accept()

, Do concurrent processes need to be run on the same machine? - Answer -no

Suppose computer A is running process B and computer C is running process D. also
suppose A and C are different computers running different hardware and B & C are
running concurrently. Can IPC be established between be and D. So then, what system
calls are typically involves in the IPC between B and C? If not, explain why B and C
cannot establish IPC? - Answer -

what system calls are used to handle the IPC between the two processes in the
command below
? ls | grep *.c - Answer -

what is section 1 of the manual pages on odin used for? - Answer -Applications

what is section 2 of the manual pages on odin used for? - Answer -system calls

what is section 3 of the manual pages on odin used for? - Answer -library functions

When reading a manual page on odin, how do you know what section you are in? -
Answer -

what is the difference between a library function call and a system function call? -
Answer -system call - a call made by the program to enter into kernel mode to access a
process
function call - made by the program to access a library function defined in a
programming library

what are the functions htonl(...) and ntohl(...) used for? Why are they typically used? -
Answer -htonl() - takes a 32-bit number in host byte order and returns a 32-bit number
in the network byte order
ntohl()- converts the unsigned integer netlong from network byte order to host byte
order.
used in TCP/IP networks, do nothing on big-endian, on little-endin they reverse the byte
order,
used for machines to communicate with each other over the network

In C++, what is the difference between pass by value and pass by reference? - Answer
-pass by value only passes a copy of a variable. meanwhile pass by refernce actually
passes the variable allowing it to be changed.

Does C have pass by reference? if not, how do we use pass by value to simulate pass
by reference behavior in C? - Answer -No. You can use dereferenced pointers as
arguments in the function definition. Also use the 'address of' (&) operator on the
variables when calling the functions

Document information

Uploaded on
December 13, 2025
Number of pages
7
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$13.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
GEEKA
3.8
(363)
Sold
2147
Followers
1448
Items
59408
Last sold
3 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions