session: "5102-foundations-of-comp-sys/2026-10-03 0000 FCS 03 Oct"
title: "FCS 03 Oct"
date: "2026-10-03 00:00"
duration: "2h 22m"
language: "en"
model: "deepseek-ai/DeepSeek-V3.2"
parts: 4
transcript_chars: 90680
generated: "2026-11-23T15:36:40+05:30"
FCS 03 Oct
Overview
This class began with administrative announcements regarding assignments and exams. It then transitioned into a hands-on exploration of AWS DynamoDB, a NoSQL database, to illustrate concepts of data modeling, resource provisioning, and cloud billing. The session then bridged from cloud services to foundational computer systems by demonstrating how user actions (like a mouse click) trigger the operating system to create and manage processes, allocating hardware resources (CPU, memory). The class concluded by connecting these practical observations to exam expectations, emphasizing scenario-based questions on resource management and OS roles.
Learning outcomes
- Explain the key differences between NoSQL (DynamoDB) and SQL databases, particularly regarding schemas, keys, and joins.
- Describe how a partition key and sort key are used in DynamoDB for data organization and retrieval.
- Use system monitoring tools (e.g., browser task manager, Windows Task Manager) to observe process creation, memory footprint, and CPU usage.
- Articulate the role of the operating system as the manager of hardware resources (CPU, RAM, disk, network) for application processes.
- Analyze a scenario involving virtual machines and bare-metal hosts to explain resource allocation and identify potential bottlenecks.
Core concepts
NoSQL Database (DynamoDB)
A non-relational database that does not enforce a fixed schema or relationships between data items. It is often faster for specific high-volume use cases compared to traditional SQL databases. This matters as it represents a different model for data storage and access, with direct implications for application design and resource usage in cloud environments.
DynamoDB Keys: Partition Key and Sort Key
The partition key determines the physical storage partition for an item, influencing data distribution and access patterns. The sort key (optional) sorts items within a partition and provides a way to query ranges. They are not equivalent to primary/foreign keys in RDBMS, as they do not define relationships but are used solely for data retrieval. This is central to understanding DynamoDB's performance and query model.
Process and Resource Allocation
A process is an instance of a running program created by the OS in response to a user request. The operating system's core function is to allocate hardware resources (CPU time, RAM, disk I/O, network) to these processes. This concept forms the bridge between software applications and the physical hardware, which is a fundamental theme of the course.
Operating System as Hardware-Software Bridge
The operating system understands both high-level application instructions and low-level hardware resources. It translates requests and manages communication, meaning applications cannot run directly on hardware without an OS. This abstraction is key to modern computing.
Formulas and maths
(No formulas were presented in this session.)
Worked examples
DynamoDB Table and Item Creation
1. Table Created: IT partner demo DB
2. Schema:
- Partition Key:
customer ID (String) - Sort Key:
order ID (String)
3. Items Inserted:
- Item 1:
customer ID=001, order ID=1001, customer name=Rajkumar Sandeshi, product=AWS training, amount=25000, status=confirmed - Item 2:
customer ID=001, order ID=1002, customer name=Rajkumar Sandeshi, product=CloudLabs, amount=5000, status=pending - Item 3:
customer ID=IIT, order ID=1003, customer name=Pratik Sharma, product=DevOps training, amount=30000, status=confirmed, city=Gurugram
4. Query Operations Demonstrated:
- A scan returned all items.
- A query with
customer ID=001 and order ID=1001 returned the specific first item. - A filter on
city=Gurugram returned the third item.
Live System Monitoring Observations
- A single browser tab (showing a timer) consumed ~96 MB of RAM. Closing it freed the memory.
- Microsoft Teams (browser) used ~1.4 GB of RAM. The AWS console tab fluctuated between 351 MB and 383 MB.
- Google Chrome showed 23 processes in Windows Task Manager.
- VMware Workstation Pro, when launched, had 13 associated processes.
- A configured virtual machine had a maximum RAM limit of 4 GB.
- The
ping -n 200 yahoo.com command created a short-lived network process.
Questions asked in class
- Iqbal: Asked about the end-semester exam format and access to previous papers.
- Answer: The exam will include MCQs and detailed questions (short/long answer). The professor will follow up with the coordinator regarding past papers.
- Anupam: How to perform joins in DynamoDB?
- Answer: Joins are not possible. You must move away from the RDBMS mindset. Data is selected using conditionals without defined relationships.
- Anuja (multiple): Clarified the role of a partition key vs. RDBMS primary key, handling of duplicate keys, versioning, backup mechanisms, and suitability for ML.
- Answer Summary: Partition/sort keys are for querying, not relationships. Duplicates override; the app must handle logic. No automatic item versioning. Backups include snapshots and Point-in-Time Recovery (PITR). ML suitability depends on specific use-case requirements.
- Vikas: How to choose a partition key?
- Answer: Similar to choosing an RDBMS primary key—based on how you need to group and access your data (e.g., by
customer_id). - Parambir: Why choose DynamoDB over SQL? Is migration possible?
- Answer: NoSQL offers flexibility, potential disk savings, and faster queries for large volumes. The trade-off is lack of SQL. Migration is technically possible using tools or custom logic.
- Satendra Kumar: How will hands-on cloud concepts be tested?
- Answer: Exams will use scenario-based questions, not hands-on tasks. Example: "Explain how resources are provided to applications running in VMs on a bare-metal host."
- Bikesh: How to mitigate AWS egress/data transfer charges and handle DynamoDB throttling errors?
- Answer: Co-locate application and database in the same region to minimize charges, balancing against regulations like GDPR. Diagnose throttling by checking if request spikes outpace DynamoDB's dynamic provisioning, which has a delay.
Key takeaways
- NoSQL databases like DynamoDB use flexible schemas and key-value items, contrasting with the rigid table structures of SQL.
- In DynamoDB, the partition key dictates data distribution, and the sort key enables ordering within a partition; they are not for defining relationships.
- Joins are not supported in DynamoDB; data retrieval relies on querying specific keys and filtering attributes.
- Every user action (e.g., a click) results in the operating system creating or managing a process.
- A process is allocated hardware resources (CPU, memory, disk, network) by the operating system.
- The operating system acts as the essential bridge, translating application requests into hardware operations.
- System monitoring tools (Task Manager, browser task manager) provide real-time visibility into process resource consumption (CPU%, memory footprint).
- Resource allocation can be hierarchical: a hypervisor allocates host resources to VMs, and the guest OS in each VM allocates resources to its processes.
- Cloud billing (e.g., for DynamoDB) is often tied to provisioned capacity (read/write units) and data transfer between regions.
- Exam questions will focus on explaining concepts and analyzing resource management scenarios, not on performing cloud operations.
- Choosing a database or architecture (SQL vs. NoSQL, region placement) involves trade-offs between performance, cost, flexibility, and regulatory compliance.
- Performance issues (e.g., throttling) require diagnosing the source: application logic, architecture, or service configuration.
Exam-style questions
1. Scenario: An e-commerce application uses DynamoDB with user_id as the partition key and order_timestamp as the sort key. A developer tries to run a query to find all orders for a specific product across all users but gets an error. Explain why this query fails and describe the correct approach to retrieve this data in DynamoDB.
- Answer Outline: The query fails because DynamoDB queries must specify the partition key. A scan operation would be required to examine all items, which is inefficient. A better design would involve creating a Global Secondary Index (GSI) with
product_id as the partition key to enable efficient querying.
2. Scenario: A virtual machine running a database appears to "hang." Using the concepts covered, describe the steps you would take to diagnose whether the bottleneck is inside the VM (e.g., the database process) or at the host level (e.g., resource contention from other VMs).
- Answer Outline: First, use monitoring tools inside the guest OS to check the database process's CPU and memory usage. If these are saturated, the bottleneck is internal. If not, check the hypervisor/host-level monitoring to see if the physical CPU cores, RAM, or disk I/O allocated to that VM are saturated due to contention from other VMs on the same host.
3. Compare and Contrast: Explain two fundamental differences between how a traditional SQL database (like PostgreSQL) and AWS DynamoDB (NoSQL) handle data relationships and schema definition.
- Answer Outline: (1) Relationships: SQL uses primary and foreign keys to enforce explicit relationships between tables, supporting JOIN operations. DynamoDB has no concept of foreign keys or joins; data is denormalized or accessed via single-table designs. (2) Schema: SQL requires a predefined, rigid schema (columns, data types). DynamoDB is schemaless; each item can have different attributes.
Glossary
- Attribute - A key-value pair within a DynamoDB item, analogous to a column in SQL.
- Bare metal - A physical server running an application directly on the hardware without a virtualization layer.
- Item - A single data record in DynamoDB, analogous to a row in a SQL table.
- Partition Key - The primary key attribute in DynamoDB that determines the physical storage location of an item.
- Process - An instance of a running program, managed by the OS with a unique PID and allocated resources.
- Sort Key - An optional secondary key in DynamoDB used to sort items within a partition.
- Throttling - Errors returned by a cloud service when request rates exceed provisioned or burst capacity limits.
- Virtual Machine (VM) - A software emulation of a computer system, running as a process on a hypervisor.
Follow-ups
- The professor will follow up with the course coordinator regarding access to previous exam papers for students.
- Security permissions (IAM roles) and detailed PartiQL query usage will be covered in the next lab session.
- The syllabus for Assignment 2 covers material "until tomorrow" – the exact cutoff should be verified.
- Students who missed Assignment 1 must contact their course coordinator, as the professor cannot enable submissions.
- Upcoming labs and theory sessions will dive deeper into the triad of resources, the operating system, and applications.