• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 38 pages
Exam (elaborations)

Answers to the question bank with rubric

Document preview thumbnail
Preview 4 out of 38 pages

Answers to all the questions of the question bank

Content preview

ECE344 Operating Systems
100-Question Solution Key & Practice Rubric
Lectures 1-10 + Lab 1 | Companion to the 100-Question Exam Practice Bank



Questions 100


Total practice marks 333


Rubric type Practice marking guide (not an official course rubric)



How to use this key

• Try each question first, then compare your answer with the expected answer.
• Use the rubric mark-by-mark: equivalent wording earns credit when the technical idea is correct.
• For code/output questions, award method marks when the reasoning is correct even if one final value is wrong.
• The marking allocations below are a practice rubric created for this question bank, not the professor's official
test rubric.
• Source basis: the Lecture 1-10 materials and Lab 1 handout supplied with this study set.

Section map

Section Questions Marks
A. Foundations and Kernels Q1-Q12 34
B. Libraries, Linking, and Q13-Q20 25
Compatibility
C. Process Creation Q21-Q35 49
D. Process Management Q36-Q50 45
E. Basic and Advanced IPC Q51-Q65 47
F. Event Loops and Process Groups Q66-Q75 33
G. Lab 1 - Adding uname to xv6 Q76-Q85 40
H. Virtual Memory Q86-Q93 29
I. Multi-Level Page Tables Q94-Q100 31




ECE344 - 100 Question Solution Key & Practice Rubric Page 1

,A. Foundations and Kernels
Questions Q1-Q12 | 34 marks in this section

Q1 | L1 | 3 marks
Define virtualization, concurrency, and persistence in the context of operating systems. Give one concrete OS example of
each.

Expected answer
Virtualization makes one physical resource appear as multiple independent resources; for example, each process
sees its own virtual address space even though RAM is shared. Concurrency means handling multiple activities
that make progress over overlapping time; for example, the OS schedules multiple runnable processes.
Persistence means retaining data consistently even when power is removed; for example, a file system stores
data on persistent storage.
Rubric (3 marks)
1 mark - Virtualization: correct definition plus a valid OS example.
1 mark - Concurrency: correct definition plus a valid OS example.
1 mark - Persistence: correct definition plus a valid OS example.



Q2 | L1 | 2 marks
Distinguish a program from a process. Why can the same program correspond to multiple processes at the same time?

Expected answer
A program is a file containing the instructions and data needed to run. A process is one running instance of a
program. The same executable can be started multiple times, creating separate processes with independent
process state such as registers and virtual memory.
Rubric (2 marks)
1 mark - Correctly distinguishes a program (stored executable) from a process (running instance).
1 mark - Explains that multiple independent process instances can run the same program simultaneously.



Q3 | L1 | 3 marks
Two copies of the same executable both report the same virtual address for a global variable, yet changing the variable in
one process does not change it in the other. Explain how this is possible.

Expected answer
The address printed by each process is a virtual address, not a physical RAM address. Each process has its own
virtual-memory mapping, so the same virtual address can map to a different physical frame in each process.
Therefore, writing the variable in one process changes only that process's mapped memory.
Rubric (3 marks)
1 mark - Identifies the reported address as a virtual address.
1 mark - Explains that each process has an independent virtual-memory mapping/address space.
1 mark - Connects the same virtual address to different physical memory, so updates are isolated.




ECE344 - 100 Question Solution Key & Practice Rubric Page 2

,Q4 | L1 | 3 marks
What resources does an operating system manage for an application? Name at least three and briefly state why the
application should not manage all of them directly.

Expected answer
The OS manages resources such as saved CPU registers/CPU execution, virtual memory, and file descriptors/I/O
resources. Central kernel management is needed to share hardware safely, enforce isolation and permissions,
and prevent one application from directly corrupting hardware state or another process's resources.
Rubric (3 marks)
1 mark - Names at least three OS-managed resources, such as registers/CPU, virtual memory, and file descriptors.
1 mark - Explains sharing/coordination of limited hardware resources.
1 mark - Explains protection/isolation or the need for privileged kernel control.



Q5 | L2 | 3 marks
What is a file descriptor? Explain why a terminal, a regular disk file, and a pipe can all be accessed through file
descriptors.

Expected answer
A file descriptor is a small integer index in a process that refers to a kernel-managed resource that can be read
from and/or written to. A terminal, regular file, and pipe have different kernel implementations, but the process
accesses each through the same file-descriptor interface such as read(), write(), and close().
Rubric (3 marks)
1 mark - Defines a file descriptor as a per-process integer/index referring to a resource.
1 mark - Explains that different resource types can be represented by file descriptors.
1 mark - Mentions the common read/write/close-style interface that hides the implementation difference.



Q6 | L2 | 2 marks
State the conventional purposes of file descriptors 0, 1, and 2. If a shell redirects standard output to a file, what changes
from the program's point of view?

Expected answer
File descriptor 0 is standard input, 1 is standard output, and 2 is standard error. If the shell redirects standard
output to a file, the program still writes to fd 1 exactly as before; the shell has changed what fd 1 refers to.
Rubric (2 marks)
1 mark - Correctly identifies fd 0, 1, and 2.
1 mark - Explains that redirection changes what fd 1 refers to, not the program's write-to-stdout logic.



Q7 | L2 | 3 marks
For write(fd, buf, count), explain what each argument means and describe one situation in which the call can fail.

Expected answer
In write(fd, buf, count), fd identifies the destination resource, buf is the address of the first byte to write, and
count is the maximum number of bytes requested. The call can fail, for example, if fd is invalid/not open for
writing, or if the underlying resource reports an error; failure is reported as -1 with errno set.

ECE344 - 100 Question Solution Key & Practice Rubric Page 3

, Rubric (3 marks)
1 mark - Explains fd.
1 mark - Explains buf and count.
1 mark - Gives a valid failure case and/or notes -1 with errno.



Q8 | L2 | 3 marks
Explain the difference between an API and an ABI. Your answer should mention both source-level behavior and machine-
level conventions.

Expected answer
An API describes what source-level interface a programmer uses: function names, arguments, return values, and
intended behavior. An ABI specifies how compiled code actually interacts at the machine level: calling
convention/register use, data layout, binary formats, and related conventions. Code can keep the same API yet
break binary compatibility if its ABI changes.
Rubric (3 marks)
1 mark - API described as the source-level interface/what the function does and accepts/returns.
1 mark - ABI described as machine/binary-level conventions such as registers/calling convention/data layout.
1 mark - Clearly distinguishes source compatibility from binary compatibility.



Q9 | L2 | 3 marks
Why can reordering fields in a C struct change the ABI even if every function name and prototype stays unchanged?

Expected answer
A C struct's field positions and offsets are part of the ABI. Code compiled against the old layout has fixed
assumptions about where x and y are stored. If a new library reorders the fields without recompiling the
executable, the old executable can read or write the wrong offsets even though function prototypes are
unchanged.
Rubric (3 marks)
1 mark - States that struct layout/field offsets are part of the ABI.
1 mark - Explains that the executable has old offsets compiled into it.
1 mark - Explains the mismatch can produce wrong accesses/results when the library uses the new layout.



Q10 | L2 | 3 marks
What is the difference between user mode and kernel mode? Why is this privilege separation important for protecting
hardware and other processes?

Expected answer
User mode is the restricted CPU privilege level used by applications. Kernel mode is a more privileged level that
can execute privileged instructions and manage hardware and virtual memory. Keeping applications in user
mode prevents them from directly controlling protected hardware or reading/writing another process's/kernel's
state; they must request privileged work through controlled system calls.
Rubric (3 marks)
1 mark - Correctly contrasts user-mode and kernel-mode privilege.
1 mark - Mentions privileged operations/hardware or memory management being restricted to the kernel.
ECE344 - 100 Question Solution Key & Practice Rubric Page 4

Document information

Study
Uploaded on
October 11, 2026
Number of pages
38
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$5.63

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

Sold
0
Followers
0
Items
3
Last sold
-



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