Computer Scientists Complete 60 Questions and
Correct Answers / WGU D686 Latest Pre-Assessment
Exam
A process attempts to access a file that is currently locked by another process.
Explain how the operating system handles file locking and prevents data corruption
while ensuring orderly access between competing processes.
Answer: The OS enforces file locks using kernel-level mechanisms, granting
exclusive or shared access. Conflicting requests wait or fail, ensuring only
permitted processes modify the file and preventing inconsistent writes.
A system is running low on available RAM due to multiple large processes.
Explain how the operating system uses paging and swapping to maintain
performance despite heavy memory pressure.
Answer: The OS swaps inactive pages to disk and keeps active pages in RAM,
guided by replacement algorithms like LRU, ensuring memory availability while
preventing complete system stalls.
,An application needs to run privileged instructions normally restricted to the
kernel. Explain how system calls allow this and describe how the OS ensures
security and controlled access to hardware resources.
Answer: System calls act as controlled gateways to kernel functions, validating
requests, enforcing permissions, and safely executing privileged operations without
exposing raw hardware access to user applications.
A multicore system experiences uneven CPU load, with some cores idle while
others are overloaded. Explain how the scheduler balances tasks to use available
processing power efficiently.
Answer: The OS periodically redistributes processes using load-balancing
algorithms, evaluating core workloads, migrating tasks, and adjusting priorities to
maintain optimal performance across all processors.
A thread inside a program stops responding while others continue working.
Explain how the operating system distinguishes thread-level problems and
provides tools to diagnose or terminate misbehaving threads.
Answer: The OS tracks each thread separately, allowing inspection of states, CPU
usage, and locks; administrators can pause, debug, or terminate faulty threads
without stopping the entire process.
A real-time application must respond to input within strict timing limits. Explain
how the operating system prioritizes real-time tasks compared to normal processes
to meet deadlines.
Answer: Real-time OS modes use deterministic scheduling, giving time-critical
, tasks higher or fixed priorities, preempting normal processes, and ensuring
guaranteed response times to meet strict deadlines.
A process opens several files and network connections before crashing. Explain
how the operating system cleans up abandoned resources and prevents memory
leaks or dangling handles.
Answer: The OS automatically releases memory, closes file descriptors, and
terminates connections during process teardown, ensuring resources are reclaimed
and preventing long-term leaks.
Two applications need secure communication over shared memory. Explain how
the OS ensures confidentiality and synchronization while allowing efficient data
exchange.
Answer: Shared memory segments are protected with permissions, and
synchronization primitives like semaphores ensure orderly access, preventing
unauthorized reads and conflicting writes between processes.
The system clock drifts due to hardware inaccuracies. Explain how the operating
system corrects time differences and maintains accurate global time for logs,
processes, and network services.
Answer: The OS adjusts using time protocols like NTP, gradually aligning system
time, correcting drift, and ensuring consistency across applications relying on
accurate timestamps.