🇵🇰 CSS Computer Science · subject

CSS Computer Science Computer Architecture, Operating Systems & Networks Syllabus

The Computer Architecture, Operating Systems & Networks syllabus for CSS Computer Science in full: 4 chapters and 18 topics, every one listed below, plus 60 Computer Architecture, Operating Systems & Networks flashcards with answers.

4Chapters
18Topics
60Flashcards

Computer Architecture, Operating Systems & Networks syllabus: all 4 chapters

Expand any chapter to see its topics and sub-topics.

  1. Computer Organization & Architecture

    4 topics
    • Performance Metrics & Architectural Levels
    • Machine Instructions & Execution Cycle
    • CISC vs RISC
    • Data Representation & Arithmetic
  2. Processor & Memory Systems

    4 topics
    • Control Unit & Microprogramming
    • Memory Hierarchy
    • Instruction-Level Parallelism
    • Superscalar, Multicore & Multiprocessor Systems
  3. Operating Systems Concepts

    4 topics
    • OS Roles, Structures & Evolution
    • Process Management
    • Memory Management & Virtual Memory
    • File Systems & I/O Management
  4. Computer Communications & Networks

    6 topics
    • Switching & Multiplexing
    • OSI & TCP/IP Models
    • Application Layer Protocols
    • Transport Layer
    • Network Layer
    • Network Security & Special Topics

CSS Computer Science Computer Architecture, Operating Systems & Networks flashcards — 60 questions with answers

  1. What is the formula for CPU execution time in terms of instruction count, CPI, and clock cycle time?

    CPU Time = Instruction Count x CPI (cycles per instruction) x Clock Cycle Time = (Instruction Count x CPI) / Clock Rate.

  2. State the Iron Law of processor performance and its three factors.

    CPU Time = Instructions/Program x Cycles/Instruction x Seconds/Cycle. The three factors are instruction count, CPI, and clock cycle time. Improving one without worsening others raises performance.

  3. Define MIPS as a performance metric and state its main weakness.

    MIPS = (Instruction Count) / (Execution Time x 10^6) = Clock Rate / (CPI x 10^6). Weakness: it cannot compare machines with different instruction sets and can vary across programs, so it is an unreliable absolute metric.

  4. State Amdahl's Law and what it implies about speedup.

    Speedup = 1 / [(1 - f) + f/s], where f is the fraction enhanced and s is the speedup of that fraction. It implies overall speedup is limited by the unenhanced portion; if f is small, even infinite s gives little gain.

  5. List the levels of abstraction (architectural levels) in a computer system from high to low.

    Application/HLL programs, High-level language, Assembly language, Operating system / Instruction Set Architecture (ISA), Microarchitecture, Logic/digital circuits, and Physical/device level.

  6. Distinguish computer architecture (ISA) from computer organization (microarchitecture).

    Architecture (ISA) is the programmer-visible interface: instructions, registers, addressing modes, data types. Organization is the hardware implementation: control signals, buses, cache design, pipeline structure. Different organizations can share one architecture.

  7. What are the typical fields of a machine instruction?

    An opcode (operation to perform) and one or more operands/operand specifiers (addresses or register references for source/destination data), sometimes with addressing-mode bits and an immediate value.

  8. List the stages of the basic instruction (machine) cycle.

    Fetch the instruction from memory, Decode it, Fetch operands, Execute the operation, and Store/Write-back the result. Then check for interrupts before the next fetch.

  9. What is the role of the Program Counter (PC) and the Instruction Register (IR) in the fetch cycle?

    The PC holds the address of the next instruction; its contents are placed on the address bus, the instruction is read into the IR (Instruction Register) for decoding, and the PC is incremented to point to the following instruction.

  10. How does the interrupt cycle modify the basic instruction cycle?

    After execution, the processor checks for pending interrupts. If one exists, it saves the current PC (and state), loads the PC with the interrupt handler's address, services the interrupt, then restores state and resumes.

  11. Compare CISC and RISC philosophies in terms of instructions and complexity.

    CISC has many complex, variable-length instructions, rich addressing modes, and microcoded control (e.g., x86). RISC has few simple fixed-length instructions, load/store architecture, many registers, hardwired control, and one-cycle execution (e.g., ARM, MIPS).

  12. What is a load/store architecture and which design (RISC/CISC) uses it?

    A load/store architecture allows only load and store instructions to access memory; all arithmetic/logic operations work on registers. It is characteristic of RISC designs and simplifies pipelining.

  13. Why does RISC typically have a higher instruction count but lower CPI than CISC?

    RISC breaks complex tasks into many simple instructions (higher count) but each executes in roughly one cycle, enabling pipelining (low CPI). CISC has fewer instructions but each can take many cycles (high CPI).

  14. How is a signed integer represented in two's complement, and how do you negate a value?

    In two's complement, the most significant bit is the sign; positive numbers are normal binary, negatives are formed by inverting all bits and adding 1. To negate: invert all bits then add 1. Range for n bits: -2^(n-1) to 2^(n-1)-1.

  15. Describe the IEEE 754 single-precision floating-point format.

    32 bits: 1 sign bit, 8 exponent bits (bias 127), and 23 fraction (mantissa) bits with an implicit leading 1. Value = (-1)^s x 1.fraction x 2^(exponent-127).

  16. What is the exponent bias in IEEE 754, and why is biased representation used?

    Bias is 127 (single) and 1023 (double). The stored exponent = actual exponent + bias. Biasing makes exponents always non-negative, allowing simple unsigned comparison/sorting of floating-point magnitudes.

  17. How does a carry differ from an overflow in binary arithmetic?

    A carry-out occurs from the most significant bit position in unsigned arithmetic (indicates unsigned out-of-range). Overflow occurs in signed (two's complement) arithmetic when the sign of the result is incorrect, e.g., adding two positives yields a negative.

  18. What is BCD (Binary Coded Decimal) and one advantage of it?

    BCD encodes each decimal digit in its own 4-bit binary code (0000-1001). Advantage: exact representation of decimal fractions and easy conversion to/from human-readable decimal, useful in financial/calculator applications.

  19. Contrast the function of the control unit with the datapath.

    The datapath performs data operations (ALU, registers, buses). The control unit generates the timing and control signals that direct the datapath: it decodes instructions and sequences the micro-operations that execute them.

  20. Differentiate hardwired control from microprogrammed control.

    Hardwired control uses fixed combinational/sequential logic (gates, state machines) - fast but hard to modify, used in RISC. Microprogrammed control stores control signals as microinstructions in control memory - flexible and easier to design, used in CISC.

Show the other 40 Computer Architecture, Operating Systems & Networks flashcards
  1. What is a microinstruction and what does a microprogram represent?

    A microinstruction is a set of control signals (micro-operations) issued in one clock; it may contain a next-address field. A microprogram is the sequence of microinstructions in control memory that implements one machine (macro) instruction.

  2. Distinguish horizontal from vertical microprogramming.

    Horizontal microinstructions are wide, with one bit per control signal, allowing high parallelism but large memory. Vertical microinstructions are narrow and encoded (decoded into signals), saving memory but allowing less parallelism and needing decoding.

  3. State the memory hierarchy levels from fastest/smallest to slowest/largest.

    Registers, L1 cache, L2/L3 cache, main memory (RAM), then secondary storage (SSD/HDD), and tertiary/offline storage. As you go down: capacity and access time increase, while cost per bit and speed decrease.

  4. State the formula for average memory access time (AMAT).

    AMAT = Hit Time + (Miss Rate x Miss Penalty). For multilevel caches it expands recursively, e.g., AMAT = HitTime_L1 + MissRate_L1 x (HitTime_L2 + MissRate_L2 x MissPenalty_L2).

  5. Define temporal and spatial locality.

    Temporal locality: recently accessed data/instructions are likely to be accessed again soon. Spatial locality: data near recently accessed addresses is likely to be accessed soon. Caches and block transfers exploit both.

  6. Compare the three cache mapping techniques.

    Direct-mapped: each block maps to exactly one cache line (simple, more conflict misses). Fully associative: a block can go in any line (flexible, expensive search). Set-associative: a block maps to one set of N lines (compromise, N-way).

  7. List the three categories of cache misses (the 3 Cs).

    Compulsory (cold) misses on first access to a block; Capacity misses because the cache cannot hold all needed blocks; Conflict (collision) misses due to too many blocks mapping to the same set in direct/set-associative caches.

  8. Contrast write-through and write-back cache policies.

    Write-through updates both cache and main memory on every write (simple, consistent, higher traffic). Write-back updates only the cache, marking the block dirty, and writes to memory only on eviction (less traffic, needs dirty bit).

  9. What is instruction-level parallelism (ILP) and the main technique to exploit it?

    ILP is the overlapping execution of multiple instructions from a single instruction stream. The primary technique is pipelining; further exploited by superscalar issue, out-of-order execution, and speculation.

  10. List the classic 5 stages of a RISC instruction pipeline.

    IF (Instruction Fetch), ID (Instruction Decode / register read), EX (Execute / ALU), MEM (Memory access), WB (Write Back to register). Each stage takes one cycle, ideally completing one instruction per cycle.

  11. Name the three types of pipeline hazards.

    Structural hazards (resource conflicts), Data hazards (dependence on a not-yet-computed result, e.g., RAW), and Control hazards (branches changing the instruction flow). Each can force stalls/bubbles unless mitigated.

  12. How are data hazards mitigated without always stalling?

    By forwarding/bypassing (routing an ALU result directly to a dependent instruction before write-back), and by compiler instruction scheduling. RAW dependences that cannot be forwarded (e.g., load-use) still require a stall/bubble.

  13. What techniques reduce control (branch) hazards?

    Branch prediction (static or dynamic), branch target buffers, delayed branches (branch delay slots), and speculative execution. Correct prediction avoids the pipeline flush that a mispredicted branch causes.

  14. Define a superscalar processor and how it differs from a scalar pipeline.

    A superscalar processor fetches, decodes, and issues multiple instructions per clock cycle to multiple execution units, achieving CPI < 1 (IPC > 1). A scalar pipeline issues at most one instruction per cycle.

  15. Distinguish multicore from multiprocessor (SMP) systems.

    A multicore chip has multiple CPU cores on one die, often sharing caches and the memory bus. A multiprocessor system has multiple separate CPU packages. SMP (symmetric multiprocessing) shares one main memory equally among all processors.

  16. What is the difference between multiprogramming, multitasking, and multiprocessing?

    Multiprogramming keeps several jobs in memory to keep the CPU busy. Multitasking (time-sharing) rapidly switches the CPU among tasks for interactivity. Multiprocessing uses two or more physical CPUs/cores executing in parallel.

  17. Compare UMA and NUMA memory architectures.

    UMA (Uniform Memory Access): all processors have equal access time to shared memory (typical SMP). NUMA (Non-Uniform Memory Access): memory is distributed; a processor accesses its local memory faster than remote memory, improving scalability.

  18. Flynn's taxonomy: name and define the four classes.

    SISD (Single Instruction Single Data - uniprocessor), SIMD (Single Instruction Multiple Data - vector/GPU), MISD (Multiple Instruction Single Data - rare), MIMD (Multiple Instruction Multiple Data - multiprocessors/multicore).

  19. What are the primary roles/functions of an operating system?

    Acts as resource manager (CPU, memory, I/O, files) and as an extended/virtual machine offering a convenient interface. Functions include process, memory, file, I/O, and security management plus providing system calls and a user interface.

  20. Compare monolithic, layered, and microkernel OS structures.

    Monolithic: all OS services in one kernel address space (fast, less modular). Layered: organized into hierarchical layers each using the one below. Microkernel: minimal kernel (IPC, scheduling, basic memory); other services run as user-space servers (modular, reliable, more overhead).

  21. What distinguishes user mode from kernel (supervisor) mode?

    Kernel mode allows execution of all (privileged) instructions and direct hardware/memory access; user mode restricts these. A mode bit enforces this. The transition to kernel mode occurs via system calls, interrupts, or traps.

  22. What is a system call and how does it transfer control to the OS?

    A system call is the programmatic interface for a user program to request an OS service (e.g., read, fork). It triggers a software interrupt/trap that switches to kernel mode, runs the corresponding kernel routine, then returns to user mode.

  23. Trace the evolution of operating systems through its major generations.

    Serial/manual processing, then batch systems, then multiprogrammed batch, then time-sharing/multitasking, then personal/desktop and real-time systems, and finally distributed, networked, mobile, and cloud/virtualized operating systems.

  24. Define a process and a process control block (PCB).

    A process is a program in execution with its own address space, resources, and state. The PCB is the kernel data structure storing a process's metadata: PID, process state, PC, CPU registers, scheduling info, memory limits, and open files.

  25. List the five states in the process state model.

    New, Ready, Running, Waiting/Blocked, and Terminated. A process moves Ready->Running (dispatch), Running->Ready (timeout/preempt), Running->Waiting (I/O request), Waiting->Ready (I/O complete), and Running->Terminated (exit).

  26. Differentiate a process from a thread.

    A process has its own address space and resources; a thread is a lightweight unit of execution within a process. Threads of one process share its code, data, and files but have separate stacks, registers, and program counters, making context switches cheaper.

  27. Compare preemptive and non-preemptive scheduling.

    In non-preemptive scheduling a running process keeps the CPU until it blocks or terminates. In preemptive scheduling the OS can forcibly take the CPU (e.g., on a timer interrupt or higher-priority arrival), improving responsiveness but adding context-switch overhead.

  28. Name common CPU scheduling algorithms and one key property of each.

    FCFS (simple, convoy effect); SJF/SRTF (optimal average waiting time, needs burst prediction, can starve); Priority (starvation, fixed by aging); Round Robin (fair, time-quantum based, good response time); Multilevel Queue/Feedback (multiple queues by priority).

  29. State the four necessary conditions for deadlock (Coffman conditions).

    Mutual exclusion, Hold and wait, No preemption, and Circular wait. All four must hold simultaneously for deadlock; breaking any one prevents it.

  30. What is the difference between logical (virtual) and physical address space?

    A logical/virtual address is generated by the CPU/program; the physical address is the actual main-memory location. The Memory Management Unit (MMU) translates logical to physical addresses at run time, enabling protection and relocation.

  31. Explain paging and the role of the page table.

    Paging divides logical memory into fixed-size pages and physical memory into equal frames. The page table maps each page number to a frame number; a logical address splits into a page number (table index) and an offset, eliminating external fragmentation.

  32. What is a TLB and why is it used?

    The Translation Lookaside Buffer is a small, fast associative cache that stores recent page-number-to-frame-number translations. It avoids a slow main-memory page-table lookup on every access, greatly speeding virtual-to-physical address translation.

  33. Distinguish internal from external fragmentation.

    Internal fragmentation: allocated memory is larger than requested, wasting space inside a block (common in paging/fixed partitions). External fragmentation: free memory exists but is split into non-contiguous holes too small to use (common in segmentation/variable partitions).

  34. What is demand paging and what triggers a page fault?

    Demand paging loads a page into memory only when it is first referenced (lazy loading). A page fault occurs when a referenced page is not in memory (valid-invalid bit set invalid); the OS then fetches it from disk and updates the page table.

  35. Name three page-replacement algorithms and identify the optimal/anomalous ones.

    FIFO (simple, suffers Belady's anomaly), Optimal/OPT (replaces the page used farthest in future - theoretical minimum faults, unimplementable), and LRU (replaces least recently used - good approximation of OPT, no Belady's anomaly).

  36. What is thrashing and how is it controlled?

    Thrashing is excessive paging where the system spends more time swapping pages than executing, due to too high a degree of multiprogramming/insufficient frames. It is controlled using the working-set model or page-fault-frequency (PFF) control to adjust allocated frames.

  37. Compare contiguous, linked, and indexed file allocation methods.

    Contiguous: blocks stored consecutively (fast access, external fragmentation). Linked: each block points to the next (no fragmentation, slow random access, pointer overhead). Indexed: an index block holds all block pointers (supports direct access, needs index space).

  38. What is an inode and what does it store?

    An inode (index node) is a file's metadata structure in Unix-like file systems. It stores file attributes (type, permissions, owner, size, timestamps) and pointers to the data blocks, but not the file name (kept in the directory).

  39. Differentiate programmed I/O, interrupt-driven I/O, and DMA.

    Programmed I/O: CPU polls device status continuously (busy-waiting, wasteful). Interrupt-driven I/O: device interrupts the CPU when ready (no polling). DMA (Direct Memory Access): a controller transfers data directly between device and memory, interrupting the CPU only on completion.

  40. What is the purpose of double buffering and spooling in I/O management?

    Buffering smooths speed mismatches between producer and consumer (double buffering lets one buffer fill while the other drains). Spooling (Simultaneous Peripheral Operation On-Line) queues output (e.g., print jobs) on disk so a slow shared device serves multiple processes without blocking them.

CSS Computer Science Computer Architecture, Operating Systems & Networks FAQ

What is in the CSS Computer Science Computer Architecture, Operating Systems & Networks syllabus?

CSS Computer Science Computer Architecture, Operating Systems & Networks is split into 4 chapters: Computer Organization & Architecture, Processor & Memory Systems, Operating Systems Concepts and Computer Communications & Networks. Together they contain 18 topics.

How many chapters are in CSS Computer Science Computer Architecture, Operating Systems & Networks?

4 chapters, containing 18 topics. The largest chapter is Computer Communications & Networks, with 6 topics.

Are there flashcards for CSS Computer Science Computer Architecture, Operating Systems & Networks?

Yes — a 60-card Computer Architecture, Operating Systems & Networks deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.