sp with linux page3

Lec21 Process Scheduling Algorithms


This session gives an overview of process scheduling algorithms used in Linux. It starts with a quick recap of some standard scheduling algorithms and the UNIX SYS-VR3 process scheduler. Then the working of Linux O(1) scheduler is discussed in detail. After this the working of the latest Linux Completely Fair Share (CFS) scheduler is discussed. Finally accessing and changing scheduling parameters on the shell using schedtool and from within a C program using Linux API are practically shown.

Email: arif@pucit.edu.pk Example Codes: https://bitbucket.org/arifpucit/spvl-repo/src

Lec22 Design And Code Of UNIX Shell Utility


This session gives an overview of working of UNIX bash shell utility. The features of bash shell are discussed in detail. The famous questions of What the Shell do? and How the shell do it? are addressed. Finally some basic versions of a shell program are designed and developed. Remaining some versions are discussed but writing their code is left as an assignment.

Email: arif@pucit.edu.pk Example Codes: https://bitbucket.org/arifpucit/spvl-repo/src

Lec23 Multi Threaded Programming


This session gives an overview of concurrent programming using pthread NPTL library. Conventional Concurrent Servers and their Problems are discussed. Available thread implementation models. Linux implementation of POSIX threads (LinuxThreads and NPTL). Thread creation and termination, joining threads, passing implicit data types to thread function, and passing structures to thread function. Returning and receiving data from a thread function. Creating Thread arrays on stack, and creating thread arrays on heap. Thread attributes (detachstate, stackaddr, stacksize, priority, inheritsched). Changing the default attributes of a thread. Threads and signals. Threads and fork(). Thread cancellation

Email: arif@pucit.edu.pk Example Codes: https://bitbucket.org/arifpucit/spvl-repo/src

Lec24 Overview Of UNIX IPC And Signals On The Shell


This session gives an overview of taxonomy of UNIX Inter Process Communication. Describing briefly the communication, synchronisation and the signals categories and their further subcategories. The persistence of different IPC objects is discussed. Finally there is a quick recap of the concept and use of standard signals on the shell

Email: arif@pucit.edu.pk Example Codes: https://bitbucket.org/arifpucit/spvl-repo/src

Lec25 Design and Code Of Signal Handlers


This session is a continuation of previous session in which we discussed signals on the shell. This session deals with different system calls to send signals to a process using kill(), raise(), abort(), pause(), alarm(), sleep(), usleep(), nanosleep() functions. Ignoring and handling signals using signal() system call. Avoiding race conditions using signal mask and sigprocmask() system call. Limitations of signal() system call. Ignoring and handling signals using sigaction() system call

Email: arif@pucit.edu.pk Example Codes: https://bitbucket.org/arifpucit/spvl-repo/src

Lec26 Programming UNIX Pipes


This session deals with the concept and use of pipes in a C program using the pipe() system call. How to use a pipe for IPC among related processes for unidirectional communication. The concept of using two pipes for bidirectional communication is also discussed and a proof of concept is given by a sample program. Finally a C program code is discussed that simulate the shell command man ls | grep ls | wc

Email: arif@pucit.edu.pk Example Codes: https://bitbucket.org/arifpucit/spvl-repo/src

Lec27 Programming UNIX Named Pipes


This session deals with the concept and use of named pipes or FIFOs in a C program using the mkfifo() and mknod() system call. How to use a named pipe for IPC among un-related processes for unidirectional communication. The concept of using two named pipes for bidirectional communication is also discussed and a proof of concept is given by a sample program

Email: arif@pucit.edu.pk Example Codes: https://bitbucket.org/arifpucit/spvl-repo/src

Lec28 Message Queues

This session deals with the concept and use of message queues. Both System-V as well as the POSIX message queues are discussed. Data structures used by System-V message queues are described. The implementation of message queues are done using the System-V API. msgget(), msgsnd(),msgrcv(),msgctl() Email: arif@pucit.edu.pk Example Codes: https://bitbucket.org/arifpucit/spvl-repo/src

Lec29 Programming With Shared Memory


This session deals with the concept and use of shared memory. The implementation of shared memory is done using the System-V API: shmget(), shmat(), shmdt(), shmctl(). Use of ipcs, and ipcrm commands are also discussed.

Email: arif@pucit.edu.pk Example Codes: https://bitbucket.org/arifpucit/spvl-repo/src

Lec30 Memory Mapped Files


This session deals with the concept and use of memory mapped files. The location of memory mappings in process address space is discussed. Comparison between private and shared file mapping. Use of mmap(), msync(), and munmap() are discussed. Finally some sample programs are discussed for a proof of concept.

Email: arif@pucit.edu.pk Example Codes: https://bitbucket.org/arifpucit/spvl-repo/src