AM Software Test 7 Leave a Comment / By fawadtwopointo@gmail.com / August 23, 2025 Welcome to your AM Software Test 7 A lock that allows multiple readers but only one writer at a time is typically called: Spinlock Binary semaphore Barrier RW-lock None Which statement about immutability in concurrent programs is TRUE? Increases race conditions Requires garbage collection Decreases need for synchronization Cannot be used in FP None Non-blocking algorithm progress guarantee where some thread always completes in finite steps is: Obstruction-free Lock-free Starvation-free Wait-free None In the Observer pattern, what type of coupling is preferred? Global variable coupling Runtime dynamic coupling via interface Tight compile-time coupling Inheritance coupling None Which GC strategy pauses less but may use more memory? Reference counting only Incremental copying Stop-the-world mark-sweep Concurrent mark-sweep (CMS) None Two-phase commit (2PC) primarily ensures: Partition tolerance Global atomicity Serializability only Availability None Which isolation level can exhibit phantom reads? Read Committed Read Uncommitted Repeatable Read Serializable None In MVCC systems, writers typically: Force table locks Block readers Create new versions Overwrite in place None Quorum (R,W) in a replicated store satisfies strong read consistency if: R > N/2 R·W > N R + W > N W > N None A gossip protocol primarily improves: Transaction latency Query optimization Disk throughput Failure detection & state dissemination None With demand paging, effective memory access time (EMAT) depends most on: TLB size only Page fault rate Disk cache size only CPU frequency None Which page replacement is stack-based (subset property holds)? a) FIFO FIFO LRU Random Clock None A kernel mechanism mapping the same physical page into multiple processes is: Shadow paging Swapping Copy-on-write Thrashing None In NUMA, to optimize performance you should: Disable thread pinning Use first-touch allocation Prefer remote memory Avoid page coloring None The main advantage of epoll/kqueue over select() is: O(n) wakeups Supports UDP only Scales with number of ready FDs, not total watched Built into POSIX timers None SSA form simplifies which optimization most? Loop unrolling Instruction scheduling Common subexpression elimination & value numbering Register renaming only None Register allocation via graph coloring tries to: Minimize stack usage by coloring interference graph Minimize pipeline stalls Inline functions Remove branches None Tail-call optimization mainly: Requires JIT Removes function calls Eliminates stack growth for tail recursion Improves cache locality None A parser that can handle left recursion and is deterministic for viable prefixes: LL(1) LR(1) Recursive descent PEG None Escape analysis helps: Allocate objects on the stack Vectorize loops Inline virtual calls Remove dead code None TCP’s slow start increases cwnd: Not at all Linearly per RTT Randomly Exponentially per RTT None HSTS mitigates: CSRF Clickjacking SSL stripping / downgrade attacks SQL injection None Perfect Forward Secrecy (PFS) relies on: Shared symmetric keys Static DH only Ephemeral Diffie-Hellman (DHE/ECDHE) RSA key transport None In SDN (OpenFlow), the control plane usually resides: In the NIC firmware In a centralized controller In BGP routers only On each switch None A side-channel attack typically exploits: Input validation errors Protocol mismatches Timing/power/cache behaviors Algorithmic complexity None Johnson’s algorithm is used for: Maximum flow All-pairs shortest paths in sparse graphs Minimum cut MST None For a Bloom filter, decreasing false positives requires: More hash functions and same size Larger bitset and optimal Storing values instead of bits Fewer hash functions and smaller bitset None If an algorithm is output-sensitive, its complexity depends on: Both input and size of the produced result Input size only Hardware cache size Output size only None Synonym of “scrutinize”: Examine Simplify Overlook Ignore None Antonym of “mitigate”: Alleviate Ease Lessen Aggravate None Time's upTime is Up!