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