Assistant Programmer – Computer Science Short
Notes (Revision)
Operating System (OS)
• Process states: New → Ready → Running → Waiting → Terminated
• Queues: Job, Ready, Waiting
• Schedulers: Long-term, Short-term, Medium-term
• CPU Scheduling: FCFS, SJF, Priority, Round Robin
• Deadlock: 4 conditions
• Paging removes external fragmentation
• Virtual memory uses disk
• Semaphore for synchronization
DBMS
• Primary key: unique + not null
• Foreign key: referential integrity
• Normalization removes redundancy
• DDL: CREATE, ALTER, DROP
• DML: INSERT, UPDATE, DELETE
• TRUNCATE faster than DELETE
• Projection: columns, Selection: rows
Networks
• OSI has 7 layers
• TCP reliable, UDP fast
• HTTP 80, HTTPS 443
• Router: network layer
• Switch: data link layer
• PAN ~10m
Programming
• OOP: Encapsulation, Inheritance, Polymorphism
• Constructor initializes object
• Python is interpreted
• Java uses JVM
• Array index starts at 0
• String immutable in Python
Web
• HTML tags: <p>, <br>, <a>, <img>
• CSS external: <link>
• GET vs POST
• AJAX uses JavaScript
• JSON: key-value
Testing
• Unit → Integration → System → Acceptance
• Black box vs White box
• Selenium: UI testing
• Postman: API testing
Misc
• Internet: network of networks
• Compiler vs Interpreter
• Binary: 0/1
• Algorithm: steps
• Flowchart: diagram