1 / 21

CS252: Systems Programming

CS252: Systems Programming. Ninghui Li Final Exam Review. Topic 1. Understand pointer usage and arithmetic &, *( p+i ) Understand argument passing behavior (especially those involving pointers) 2d Array implementation

lev
Download Presentation

CS252: Systems Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS252: Systems Programming Ninghui Li Final Exam Review

  2. Topic 1 • Understand pointer usage and arithmetic • &, *(p+i) • Understand argument passing behavior (especially those involving pointers) • 2d Array implementation • Using function pointers in generic functions that deal with data of different types

  3. Topic 2 Static vs. shared library Program sections: text, stack, heap, data, especially in the context of software security

  4. Topic 3: Unix Systems Overview • Hard link vs soft link • Processes, setuid, how effective/real/saved uid changes

  5. Topic 4: Regular Expressions • Understand what kind of strings are matched by a regular expression • Able to write a regular expression to match certain sets of strings

  6. Topic 5: Unix Tools Know the basic functionality of the UNIX commands in the slides Shell programming not required for final exam.

  7. Topic 6: Flex/Bison Nothing in particular required for final exam

  8. Topic 7: Project 3 Write grammar for YACC. What is an open file object? What information does it include? What is the semantics for pipe, dup, dup2, especially how they affect the creation/deletion and reference count of open file object? How to implement pipe and redirection using pipe, dup, dup2?

  9. Topic 8: Kernel Mode, System Calls, etc. • User mode vs kernel mode • Poling (synchronous) vs asynchronous

  10. Topic 9: Processes and Scheduling • What are non-preemptive scheduling and preemptive scheduling? What are the pros & cons of each? Which one is used in modern OS? • How does the round robin scheduling work? • How response time and overhead are affected by quantum length? • What are factors for choosing quantum length? • Response time, overhead, CPU burst distribution

  11. Topic 10: Threads Why one wants to use multiple threads? What are the pros and cons of using threads vs. processes? What is an atomic section? Why does disabling interrupt ensure atomicity on a single CPU machine? What is a mutex lock? What is the semantics of lock and unlock calls on a mutex lock? How to use mutex locks to achieve atomicity?

  12. Topic 11 How to implement recursive mutex locks (part of Project 4)? What is a race condition? (When given simple codes, should be able to come up with race condition scenario.) What happens when calling sem_wait(), sem_post? (Should be able to produce pseudo-code.) Different usage of semaphore when initiating it with different values. What are the key difference between binary semaphore and mutex lock? How to implement a synchronized list? Why we need both mutex and semaphore?

  13. Topic 12 What are Condition Variables? What is the behavior of wait/signal on CV? How to implement semaphores using using CV and Mutex? How to implement bounded buffer using semaphores? What is a deadlock? How to prevent deadlocks by enforcing a global ordering of locks? Why this prevents deadlocks?

  14. Topic 12 What are read/write locks? What is the behavior of read/write lock/unlock? How to implement R/W locks using semaphore? Why the implementation given in the slides can cause writer starvation? How to Implement a read/write lock where writer is preferred (i.e., when a writer is waiting, no reader can gain read lock and must wait until all writers are finished)?

  15. Topic 13, 14 Nothing required for final exam

  16. Topic 15 • Packet switching networking • Layered architecture (application, transport, network, link) • Addresses & translation services • MAC, IP, Domain names • ARP and DNS • Additional services of UDP over IP: port number • Additional services of TCP over IP: port number • Reliable (achieved using acknowledgement and retransmission), connection-oriented communication

  17. Topic 16: Socket Programming • Server calls: socket, bind, listen, and accept • Behavior of accept, returns a new socket • Client calls: socket, connect

  18. Topic 17: Project 5 • Implementing five types of server concurrency • Iterative Server • Fork Process After Request • Create New Thread After Request • Pool of Threads • Pool of Processes

  19. Topic 18: SQL • Writing basic SQL SELECT queries • SELECT … FROM … WHERE • Joining tables when needed • Using tuple variables when needed • No need for DISTINCT, ORDER BY • Give query result when given query and tables • INSERT, DELETE not covered in exam

  20. Topic 19: Software Security • Able to identify the following vulnerabilities in code, and necessary inputs to exploit them • Input validation, buffer overflow, format string, integer overflow • Understand stack overflow exploit that overwrite return address to point to injected shell code, and return-to-libc attacks • Understand basic idea and limitation of non-executable stack

  21. Topic 20: Computer Security Basics Understand basic security goals: confidentiality, integrity, availability

More Related