CPU Scheduling Policies

CPU Scheduling Policies

This lecture discusses scheduling policies used by OS to allocate CPU time among processes. Topics include preemptive vs non-preemptive scheduling, algorithms like FIFO, SJF, Round Robin, Multi-level Feedback Queues, and considerations for multicore processors.

Processes

Processes

This lecture introduces processes as running instances of programs. It covers process life cycle management, process states, process control blocks, and system calls like fork, exec, exit, and wait. It explains process scheduling, context switching, and how the shell executes commands.

Describes sleep/wakeup mechanism for process synchronization in xv6: channels, spinlocks, examples with pipes and wait/exit, missed wakeup prevention.

Explains spinlock implementation using xchg instruction, interrupt disabling, ptable.lock across context switching, and critical section protection.

Details process memory management in xv6: page table construction, fork memory copying, sbrk heap expansion, and exec system call memory setup.