List of questions (ITI8510)
Allikas: Lambda
Real-Time Operating Systems and Systems Programming |
[ @ ] |
This list of questions serves as a pool of questions that might be present at the exam. Your mileage may vary. The image is illustrative. Items in mirror may be closer than they appear.
Sisukord
- 1 Lecture 1: Introduction
- 2 Lecture 2: Real-Time Operating Systems
- 3 Lecture 3: Input / Output
- 4 Lecture 4: Understanding memory (Stack)
- 5 Lecture 5: Understanding memory (Heap)
- 6 Lecture 6: Interrupts, Signals, Threads
- 7 Lecture 7: Scheduling
- 8 Lecture 8: Programming an Operating System
- 9 Lecture 9: Optimization
- 10 Lecture 10: Networking
- 11 Lecture 11: Getting to know the hardware
- 12 Lecture 12: Real-Time Operating Systems
Lecture 1: Introduction
- What are real-time systems?
- What are the main characteristics of real-time systems?
- How did priority inversion affect Pathfinder rover in 1997?
- What is priority inheritance?
- Describe the difference between synchronous and asynchronous events
- How does state based system differ from event based system?
- What is deterministic real-time system?
- What is the difference between soft, firm and hard real-time systems?
- When workload changes but resources remain constants: is it possible to create statically predictable real-time system?
- What are the possibilities for certifying a dynamic real-time system?
- What is latency?
- What system constraints can create design conflicts apart from real-time requirement?
Lecture 2: Real-Time Operating Systems
- Why are operating systems created?
- Describe the possible services for operating systems.
- What services are usually not included in real-time operating systems?
- Why is predictablility, for RTOS, more important than speed?
- What is re-entrancy and why is it important for RTOS libraries?
- Why is buying a RTOS considered better than writing one?
- What is POSIX?
- What are the problems for Linux as RTOS? Benefits?
- How does RTLinux run RT tasks?
- Describe possible scheduling strategies. Which are feasible for RTOS?
Lecture 3: Input / Output
- What is memory mapped hardware access?
- For memory mapping: how do you write into a device's registers?
- What is IO mapped hardware access?
- What does port polling mean?
- Explain the difference between blocking and nonblocking IO operations
- Why is IO blocking needed at all?
- How is select() function used?
- How do interrupts help IO?
- What are the architectural requirements for CPU to support interrupts?
- What happens when interrupt line activates on CPU?
- Why can interrupts be generated internally in CPU?
- Interrupt types: Polling, Interrupt Vector Table (IVT), Programmable Interrupt Controller (PIC)
- How vector interrupts work? What is Interrupt Vector Table (IVT)
- Explain the first and last actions of an Interrupt Service Routine.
- How can interrupt priorities be handled in software?
Lecture 4: Understanding memory (Stack)
- What kind of memory is faster to access than RAM?
- What are the possible operations of a stack data structure?
- Write a short possible stack implementation in C
- What are the hardware requirements for stack implementation?
- What characteristics of assembly language make it unpopular?
- What is the purpose of registers %esp and %ebp on IA32 architecture?
- Can you refer to memory addresses in assembly?
- What do the assembly commands "push %eax"; "pop %edx" do?
- Explain the contents of a non-active stack frame
- How are call, leave and ret operators used?
- In general: while it's good to know the stack on operator level, general understanding of its workings should be sufficient. See slides "Recap" and "Stack frame"
- Why are some registers Caller save and some Callee save registers?
- Explain some of the ways in which call stack affects the behaviour of C programs.
- Explain how overflowing buffers are exploited by hackers.
Lecture 5: Understanding memory (Heap)
- What does "brk" pointer hold?
- Why is dynamic allocation avoided for Real-Time Systems?
- How can fragmentation reduce the amount of free memory?
- In theory you could solve fragmentation by moving memory contents. Why it is not done?
- How are block headers hidden from modification?
- Why can we use 3 lower bits of block size in header to store data?
- Describe first fit; next fit; best fit allocation strategies
- Sometimes it is necessary to join memory blocks, when is it done?
- Why are free memory blocks sometimes segregated?
- What is Garbage Collection?
Lecture 6: Interrupts, Signals, Threads
- How is protected mode related to interrupts?
- Why are interrupts considered synchronous and asynchronous?
- Why are interrupts sometimes blocked?
- Explain access serialization as a method for data protection
- What are system calls and how are they related to interrupts?
- Explain how signals are different from and similar to (hardware) interrupts?
- Do blocked signals wait or are they discarded?
- What are the possible registered default actions for a signal?
- Is it possible for several signals of the same type to arrive while blocked or pending?
- What are the common patterns for writing signal handlers?
- Threads: should only know what is a thread, since they were used as a tool for explaining data sharing and critical sections for concurrent programming.
- What is a race condition?
- What is a mutex?
- How can a mutex solve race conditions?
Lecture 7: Scheduling
- Are the goals for scheduling - processor usage maximization and response time maximization mutually exclusive?
- What does it mean for scheduling to be preemptive; non-preemptive?
- What is static scheduling?
- What are the problems of round-robin scheduling?
- How does rate monotonic scheduling work?
- Can you find cases in which Earliest Deadline First is better than Rate Monotonic Scheduling?
- How does a simple cyclic executive work?
- What are the three intuitive priority levels for cyclic executive?
- What can be done if you have a task which takes 100ms and time-slot is only 60ms and the task exeeds its time slot?
- What happens if a POSIX process is set to be scheduled with SCHED_RR; SCHED_FIFO?
- Can you set priorities for tasks which are scheduled with SCHED_OTHER
- How can paging affect real time processes and what can be done to avoid it?
Lecture 8: Programming an Operating System
- What would be the minimal data that is stored for a suspended task?
- What are the three common states for tasks?
- What is a scheduling point?
- What is the purpose of OS clock tick?
- What is stored in a ready list?
- Why is there an idle task?
- How does context switch work?
- Why one cannot write context switching without assembly code?
- Describe locking/setting of a mutex which uses a waiting list.
- What is a deadlock?
Lecture 9: Optimization
- Why is optimization not the default option for compilers?
- Describe some of the limitations for optimization.
- Why is cycles per element better way of measuring optimization than running time?
- Explain the reasoning behind following optimizations:
- Move calculations out of loop
- Reduce function calls
- Extra storage variables in loops
- Loop unrolling
- Pointer access for arrays
- How can knowledge of CPU pipelining help optimization?
- How can cache and branch prediction affect optimization.
- What is code profiling?
- Why is C99 standard suggesting use of inline keyword in stead of a macro?
- What methods can you use to reduce:
- code size?
- memory usage?
- power consumption?
- Describe problems which optimization can introduce.
Lecture 10: Networking
- Describe the difference between Unix IO and Standard IO functions.
- What are the main functions for Unix IO?
- There are 3 structures for storing open files in a system kernel: what are they?
- How many bytes are there in an IP-address?
- What is the purpose of DNS services?
- Is network byte order little- or big-endian? What does it mean?
- What function is used for domain name retrieval?
- What is a socket?
- What does a socket address store?
- What is the sequence of functions for:
- creating and connecting a socket to a computer?
- creating and listening on a socket to create a server?
- Why is it necessary to create a handler for EPIPE signal when working with sockets?
Lecture 11: Getting to know the hardware
- What general steps are needed for undestanding the hardware?
- Why are hardware component datasheets interesting for a programmer?
- Describe some of the things an assembly programmer should know about the processor.
- Why is it necessary to use assembly in initialization code?
Lecture 12: Real-Time Operating Systems
- Which of the following are very popular RTOS-es? (w/ some list)
- What is the background for OSEK/VDX standard?
- What is a priority ceiling?
- Nucleus has a very uncharacteristic feature for an RTOS, what is it?
- VxWorks is a pun on another operating system, which?
- How does VxWorks ease development of RT-systems?
- How did uC/OS-II start and why is it popular?