CS604 – Operating Systems: Midterm Important Subjective (59 Solved Q&As)

Computer Science • Read every solved subjective question with its model answer directly on this page. Free, no login required.

All 664 Midterm Packs · CS604 Course Page · CS604 MCQ Pack (281 MCQs)

  1. Which command is used in the Linux environment to get information about processes? Describe its commonly used options.
    Topic: Processes, Threads & UNIX/Linux Commands

    The ps command gives a snapshot of the current processes. Without options, ps prints information about processes owned by the user. Some of the commonly used options are: -e : selects all processes -l : formats the output in the long format -u : displays the information in user-oriented format The top command can also be used to display information about the top processes continuously.

  2. If a process is in the background and we want to move it into the foreground, which UNIX/Linux command is used? Also write the command used to put a job into the background.
    Topic: Processes, Threads & UNIX/Linux Commands

    The fg command is used to resume the execution of a suspended job in the foreground or to move a background job into the foreground. Its syntax is: fg [%job_id] where job_id is the job ID (not the process ID) of the suspended or background process. If %job_id is omitted, the current job is assumed. Similarly, the bg command is used to put the current or a suspended process into the background: bg [%job_id]

  3. How can a foreground process be suspended? How can a process be terminated in UNIX/Linux?
    Topic: Processes, Threads & UNIX/Linux Commands

    A foreground process can be suspended by pressing <Ctrl-Z>, which sends a STOP/SUSPEND signal to the process. A foreground process can be terminated by pressing <Ctrl-C>. A process can also be terminated with the kill command, which sends a signal to the process whose process ID is specified in the command line. Its syntax is: kill [-signal] PID When executed without a signal number, the kill command sends the SIGTERM signal to the process.

  4. How would you display the status of suspended and background jobs in UNIX/Linux?
    Topic: Processes, Threads & UNIX/Linux Commands

    The jobs command is used to display the status of suspended and background processes (jobs) of the current shell session.

  5. What is the purpose of the fork() system call? Discuss what happens when it is executed, from the user's and the kernel's point of view.
    Topic: Processes, Threads & UNIX/Linux Commands

    When the fork system call is executed, a new process is created. The original process is called the parent process and the new process is called the child process. The new process consists of a copy of the address space of the parent, so the child gets copies of the parent's code, data and stack. This mechanism allows the parent process to communicate easily with its child process. On success, both processes continue execution at the instruction after the fork call, with one difference: the return code for the fork system call is zero (0) for the child process, while the process identifier (PID) of the child is returned to the parent process. On failure, -1 is returned in the parent's context, no child process is created, and an error number (errno) is set appropriately.

  6. Write down the similarities and dissimilarities between a process and a thread.
    Topic: Processes, Threads & UNIX/Linux Commands

    Similarities: 1) Both share the CPU and execute sequentially. 2) Both can create children (a process can create child processes; a thread can create child threads). 3) If one process/thread is blocked, the next can start to run. Dissimilarities: 1) Threads are not independent like processes; processes are independent of one another. 2) All threads can access every address in the task (they share the address space), unlike processes, which have separate address spaces. 3) Threads are designed to assist one another, whereas processes may or may not assist one another because they may originate from different users.

  7. What is a thread? What does a thread comprise of, and what does it share with other threads of the same process?
    Topic: Processes, Threads & UNIX/Linux Commands

    A thread, sometimes called a lightweight process (LWP), is a basic unit of CPU utilization and executes within the address space of the process that creates it. It comprises a thread ID, a program counter, a register set, errno, and a stack. It shares with other threads belonging to the same process its code section, data section, current working directory, user and group IDs, signal setup and handlers, and other operating system resources such as open files.

  8. What are the advantages and disadvantages of multithreading? Is resource sharing an advantage or a disadvantage of threads? Explain briefly.
    Topic: Processes, Threads & UNIX/Linux Commands

    Advantages of threads: 1) Responsiveness: Multithreading an interactive application may allow a program to continue running even if part of it is blocked or is performing a lengthy operation, thereby increasing responsiveness to the user. 2) Resource sharing: By default, threads share the memory and the resources of the process to which they belong. Code sharing allows an application to have several different threads of activity all within the same address space. 3) Economy: Allocating memory and resources for process creation is costly. Because threads share the resources of the process to which they belong, it is more economical to create and context-switch threads. 4) Utilization of multiprocessor architectures: The benefits of multithreading can be greatly increased in a multiprocessor environment, where each thread may be running in parallel on a different processor. A single-threaded process can only run on one CPU no matter how many are available. Disadvantages of threads: 1) Resource sharing: Whereas resource sharing is one of the major advantages of threads, it is also a disadvantage because proper synchronization is needed between threads for accessing the shared resources (e.g., data and files). 2) Difficult programming model: It is difficult to write, debug, and maintain multi-threaded programs for an average user. This is particularly true when it comes to writing code for synchronized access to shared resources. So, resource sharing is both an advantage and a disadvantage: it makes communication between threads easy and fast, but it requires proper synchronization to keep shared data consistent.

  9. Differentiate between user-level threads and kernel-level threads.
    Topic: Processes, Threads & UNIX/Linux Commands

    User threads are supported above the kernel and are implemented by a thread library at the user level. The library provides support for thread creation, scheduling, and management with no support from the kernel. Since the kernel is unaware of user-level threads, all thread creation and scheduling are done in the user space without the need for kernel intervention, and therefore they are fast to create and manage. However, if the kernel is single-threaded, any user-level thread performing a blocking system call will cause the entire process to block, even if other threads are available to run within the application. Examples of user thread libraries are POSIX Pthreads, Solaris 2 UI-threads, and Mach C-threads. Kernel threads are supported directly by the operating system. The kernel performs thread creation, scheduling, and management in kernel space, so kernel-level threads are slower to create and manage compared to user-level threads. However, since the kernel is managing the threads, if a thread performs a blocking system call, the kernel can schedule another thread in the application for execution. Windows NT, Windows 2000, Solaris, BeOS and Tru64 UNIX support kernel threads.

  10. What is the main disadvantage of the one-to-one multithreading model?
    Topic: Processes, Threads & UNIX/Linux Commands

    In the one-to-one model, each user thread is mapped to a separate kernel thread, which provides full concurrency. Its main disadvantage is the overhead of creating a kernel thread for every user thread, which can burden the performance of the system if a large number of threads are created.

  11. What will happen if exit() is called instead of pthread_exit() in a multithreaded program?
    Topic: Processes, Threads & UNIX/Linux Commands

    If the exit() system call is used, it will terminate the whole process instead of just the calling thread, because the purpose of the exit() system call is to terminate a process, not a thread. To terminate only the calling thread while keeping the process (and its other threads) alive, pthread_exit() must be used.

  12. If a process exits and there are still threads of that process running, will they continue to run? Justify your answer.
    Topic: Processes, Threads & UNIX/Linux Commands

    No. Threads exist only within the address space of their process, so when a process terminates, all of its threads terminate with it. Similarly, if a thread receives a signal (for example, Ctrl-C) whose default action is to terminate the process, the whole process — including all of its running threads — is terminated.

  13. Write a C code fragment to create a thread. Take the thread ID in a variable named newThread and run the MyThreadFunc function in the new thread.
    Topic: Processes, Threads & UNIX/Linux Commands

    #include <stdio.h> #include <stdlib.h> #include <pthread.h> /* Prototype for the function to be passed to our thread */ void* MyThreadFunc(void *arg); int main() { pthread_t newThread; /* Create a thread and have it run MyThreadFunc */ pthread_create(&newThread, NULL, MyThreadFunc, NULL); return 0; } void* MyThreadFunc(void* arg) { printf("The thread.\n"); return NULL; }

  14. How are C programs compiled and executed in Linux using the gcc compiler? Explain the use of the -o and -l options.
    Topic: Processes, Threads & UNIX/Linux Commands

    To compile a source file titled program.c, type: $ gcc program.c This produces an executable file named a.out, which can be run by typing: $ ./a.out The executable program can be stored in a specific file by using the -o option. For example, the following command stores the executable in a file named assignment: $ gcc program.c -o assignment A library can be linked explicitly by using the -l option. For example, the following command links the math library with the program while creating the executable file assignment: $ gcc program.c -o assignment -lm

  15. What does the term 'redirection' mean in UNIX/Linux? Write down the basic syntax for input, output and error redirection.
    Topic: Processes, Threads & UNIX/Linux Commands

    The standard files stdin, stdout and stderr are attached to the terminal by default. Linux redirection features can be used to detach these default files from stdin, stdout and stderr and attach other files with them for a single execution of a command. This act of detaching the default files and attaching other files is known as input, output and error redirection. Input redirection (stdin is attached to a file instead of the keyboard): command < input-file or command 0< input-file Output redirection (stdout is attached to a file instead of the screen): command > output-file or command 1> output-file Error redirection (stderr is attached to a file instead of the screen): command 2> error-file

  16. UNIX/Linux provides many commands. Write the method through which these commands can communicate with each other.
    Topic: Processes, Threads & UNIX/Linux Commands

    Commands communicate with each other through pipes. A pipe connects the standard output of one command to the standard input of another command, so the output of the first command becomes the input of the second command without creating any temporary file. On the command line, a pipe is represented by the | symbol, and several commands can be chained together, for example: Cmd1 | Cmd2 | ... | CmdN For example, the output of the ls command can be passed to the wc command to count the number of files in a directory.

  17. What are named pipes or FIFOs?
    Topic: Inter-Process Communication: Pipes & FIFOs

    FIFOs (also known as named pipes) are a method of inter-process communication used for communication between related or unrelated processes on a UNIX/Linux system. Unlike an unnamed pipe, a FIFO has a name in the file system, so any process that knows the name can open and use it for communication.

  18. Differentiate between a pipe and a FIFO.
    Topic: Inter-Process Communication: Pipes & FIFOs

    A FIFO is similar to a pipe: both provide a one-way (half-duplex) flow of data. The difference between pipes and FIFOs is the manner in which they are created and opened; once these tasks have been accomplished, I/O on pipes and FIFOs has exactly the same semantics. A FIFO is identified in the file system with a name (it is a named pipe), whereas an unnamed pipe is not. FIFOs are identified by an access point which is a file within the file system, whereas pipes are identified by an access point which is simply an allotted inode. Another major difference is that FIFOs last throughout the life-cycle of the system (until explicitly removed using unlink), while pipes last only during the life-cycle of the process in which they were created. Also, pipes can be inherited only by related processes (descendants of a single process), whereas FIFOs can be shared by unrelated processes as well.

  19. How can a pipe be created? What does the pipe() system call return, and when does it fail?
    Topic: Inter-Process Communication: Pipes & FIFOs

    A pipe is created with the pipe() system call: int pipe(int pfds[2]); The pipe() system call creates a pipe and returns two file descriptors in the array pfds: pfds[0] is the descriptor for reading from the pipe and pfds[1] is the descriptor for writing to the pipe. On success it returns 0; on failure it returns -1 and no pipe is created. The pipe() system call can fail for reasons including the following: 1) At least two slots are not empty in the per-process file descriptor table. 2) Too many files or pipes are already open in the process. 3) Buffer space is not available in the kernel. 4) The system-wide file table is full.

  20. Why are pipes and FIFOs useful? Give at least two uses.
    Topic: Inter-Process Communication: Pipes & FIFOs

    Two common uses of pipes/FIFOs are: 1) In client-server applications, FIFOs are used to pass data between a server process and its client processes. 2) They are used by shell commands to pass data from one shell pipeline to another, without creating temporary files.

  21. The mknod() system call may fail due to different reasons. Identify at least three failure scenarios of mknod(). Do you think the reasons for the failure of the mknod() system call and the mkfifo() library call are the same? Give a reason to support your answer.
    Topic: Inter-Process Communication: Pipes & FIFOs

    As is the case with all system calls in UNIX/Linux, mknod() returns -1 on failure and errno is set accordingly. Some of the reasons for this call to fail are: 1) A file with the given name already exists. 2) The pathname is too long. 3) A component in the pathname is not searchable, non-existent, or not a directory. 4) The destination directory is read-only. 5) Not enough memory space is available. 6) A signal is caught during the execution of mknod(). Yes, the reasons are pretty much the same, because the normal file I/O system calls (close(), read(), write(), unlink(), etc.) all work with FIFOs, and mkfifo() internally invokes the mknod() system call to create the FIFO. Hence the reasons for the failure of mkfifo() are pretty much the same as those for the mknod() call.

  22. Consider the following statement: read(pfds[1], buf, -5); Do you think the given statement will work properly? Give reasons to support your answer.
    Topic: Inter-Process Communication: Pipes & FIFOs

    No, the statement will not work properly, for two reasons: 1) pfds[1] is the write end of the pipe; data is read from a pipe through pfds[0], the read end. Using pfds[1] for reading is incorrect. 2) The third argument of read() is the number of bytes to read, which cannot be negative; -5 is an invalid count. Because of these errors, the read() call will fail and return -1.

  23. Consider the following session: $ gcc server.c -o server $ gcc client.c -o client $ server & [1] 432056 $ client Hello, world! Hello, class! Out of the server and client processes in the given session, which process runs in the foreground and which runs in the background? Also tell what [1] and 432056 represent.
    Topic: Inter-Process Communication: Pipes & FIFOs

    The server process runs in the background, because its command line is terminated with the & operator, which runs a command in the background. The client process runs in the foreground, because it is executed without the & operator. In the output line [1] 432056: [1] is the job number (job ID) assigned by the shell to the background job. 432056 is the process ID (PID) of the server process.

  24. How can you differentiate between a library call and a system call? Explain briefly, giving at least one example.
    Topic: Inter-Process Communication: Pipes & FIFOs

    System calls are the functions provided by the kernel; they form the interface through which user programs request services from the operating system, and they are handled directly by the kernel. Examples are read(), write(), fork() and mknod(). Library calls are functions provided within program libraries. The program making a library call uses the library code linked with it, and a library call may or may not invoke system calls internally. For example, mkfifo() is a library call that internally invokes the mknod() system call to create a FIFO.

  25. List and define the different metrics (criteria) by which we can evaluate a CPU scheduler. List at least four.
    Topic: CPU Scheduling

    CPU scheduling algorithms can be evaluated using the following criteria: 1) CPU utilization: The percentage of time the CPU is kept busy. We want to keep the CPU as busy as possible. 2) Throughput: The number of processes completed per unit time. 3) Turnaround time: The interval from the time of submission of a process to the time of its completion. 4) Waiting time: The total time a process spends waiting in the ready queue. CPU scheduling affects only the amount of time a process spends waiting in the ready queue. 5) Response time: The time from the submission of a request until the first response (output) is produced; it is important for user-friendly, interactive systems. When evaluating a scheduler's performance, utilization and throughput are generally traded off for better response time.

  26. What is the difference between preemptive and non-preemptive scheduling? Give one example of each.
    Topic: CPU Scheduling

    Preemptive scheduling allows a process to be interrupted in the middle of its execution; the CPU is taken away from it and allocated to another process. Non-preemptive scheduling ensures that a process relinquishes control of the CPU only when it finishes its current CPU burst (or blocks for I/O or terminates). FCFS is a non-preemptive scheduling algorithm. Round Robin is a preemptive scheduling algorithm. The SJF algorithm may be either preemptive or non-preemptive; preemptive SJF scheduling is sometimes called shortest-remaining-time-first scheduling.

  27. Write the difference between the SJF and the Shortest Remaining Time First (SRTF) scheduling algorithms.
    Topic: CPU Scheduling

    Shortest Job First (SJF) is the non-preemptive version: once the CPU is given to a process, it cannot be preempted until it completes its CPU burst. It is generally used for long-term scheduling in batch systems, where the length of a job can be taken as the process time limit that a user specifies when submitting the job. Shortest Remaining Time First (SRTF) is the preemptive version of SJF: whenever a new job arrives, its remaining service time is compared with the remaining time of the currently running job, and the job with the shorter remaining time gets the CPU. For all but the longest jobs, SRTF gives better (lower) average waiting time and a better response ratio than SJF.

  28. Calculate the average waiting time for the following set of processes using preemptive Shortest Job First (Shortest Remaining Time First) scheduling: Process Arrival Time Burst Time P1 0 7 P2 2 4 P3 4 1 P4 5 4
    Topic: CPU Scheduling

    Preemptive SJF scheduling is sometimes called shortest-remaining-time-first scheduling. The Gantt chart for the given processes is: | P1 | P2 | P3 | P2 | P4 | P1 | 0 2 4 5 7 11 16 Waiting time of each process = (completion time - arrival time - burst time): P1: 16 - 0 - 7 = 9 P2: 7 - 2 - 4 = 1 P3: 5 - 4 - 1 = 0 P4: 11 - 5 - 4 = 2 Average waiting time = (9 + 1 + 0 + 2) / 4 = 12 / 4 = 3.

  29. Consider the performance of the FCFS algorithm for three compute-bound processes P1 (24 seconds), P2 (3 seconds) and P3 (3 seconds), arriving in the order P1, P2, P3. Calculate the waiting time per process, the average waiting time, and the average turnaround time.
    Topic: CPU Scheduling

    Under FCFS, the processes execute in the order P1, P2, P3. Waiting times: P1 = 0; P2 = 24; P3 = 27. Average waiting time = (0 + 24 + 27) / 3 = 17. Turnaround times: P1 = 24; P2 = 27; P3 = 30. Average turnaround time = (24 + 27 + 30) / 3 = 27. Note that if the processes arrived in the order P2, P3, P1, the average waiting time would drop to (0 + 3 + 6) / 3 = 3, which shows that the average waiting time under FCFS is highly dependent on the arrival order (the convoy effect).

  30. Calculate the performance of the FCFS algorithm for three processes ready in the queue at time 0 with burst times P1 = 20 seconds, P2 = 5 seconds and P3 = 4 seconds. Calculate the waiting time per process and the average waiting time when (i) the processes arrive in the order P1, P2, P3, and (ii) the processes arrive in the order P3, P2, P1.
    Topic: CPU Scheduling

    (i) Arrival order P1, P2, P3: Waiting times: P1 = 0; P2 = 20; P3 = 25. Average waiting time = (0 + 20 + 25) / 3 = 45 / 3 = 15. (ii) Arrival order P3, P2, P1: Waiting times: P3 = 0; P2 = 4; P1 = 9. Average waiting time = (0 + 4 + 9) / 3 = 13 / 3 = 4.33 (approximately). The comparison shows that the average waiting time under FCFS varies greatly with the arrival order of the processes.

  31. What is the convoy effect in FCFS scheduling?
    Topic: CPU Scheduling

    When the FCFS scheduling algorithm is used, the convoy effect occurs when short processes wait behind one long (CPU-bound) process to use the CPU, and then enter the ready queue in a convoy after completing their I/O. As a result, CPU and device utilization can be lower than possible, and the average waiting time becomes quite long.

  32. Write briefly about multilevel feedback queue scheduling.
    Topic: CPU Scheduling

    Multilevel feedback queue scheduling allows a process to move between queues. The idea is to separate processes with different CPU burst characteristics. If a process uses too much CPU time, it will be moved to a lower-priority queue. This scheme leaves I/O-bound and interactive processes in the higher-priority queues. Similarly, a process that waits too long in a lower-priority queue may be moved to a higher-priority queue. This form of aging prevents starvation. In general, a multilevel feedback queue scheduler is defined by the following parameters: 1) The number of queues. 2) The scheduling algorithm for each queue. 3) The method used to determine when to upgrade a process to a higher-priority queue. 4) The method used to determine when to demote a process to a lower-priority queue. 5) The method used to determine which queue a process will enter when it needs service.

  33. Define any three queues that are used in multilevel feedback queue scheduling.
    Topic: CPU Scheduling

    A typical multilevel feedback queue scheduler uses three queues, for example: 1) Queue 0: Round Robin scheduling with a time quantum of 8 milliseconds. New processes enter this queue; if a process finishes within the quantum, it leaves the system. 2) Queue 1: Round Robin scheduling with a time quantum of 16 milliseconds. A process that does not complete in queue 0 is demoted to this queue. 3) Queue 2: First-Come, First-Served scheduling. A process that does not complete in queue 1 is demoted to this queue and runs only when the higher queues are empty. In this way, short and interactive processes finish quickly in the higher queues, while long CPU-bound processes sink to the lower queues.

  34. Describe the UNIX System V scheduling algorithm.
    Topic: CPU Scheduling

    The UNIX System V scheduling algorithm is essentially a multilevel feedback priority queues algorithm with Round Robin within each queue, the quantum being equal to 1 second. The priorities are divided into two groups/bands: 1) Kernel Group 2) User Group Priorities in the Kernel Group are assigned in a manner to minimize bottlenecks, i.e., processes waiting in a lower-level routine get higher priorities than those waiting at relatively higher-level routines. In decreasing order of priority, the kernel bands are: 1) Swapper 2) Block I/O device control processes 3) File manipulation processes 4) Character I/O device control processes 5) User processes User processes are the lowest-prioritized processes in the Kernel Group bands, and priorities of user processes are adjusted dynamically using their recent CPU usage and nice value.

  35. How is Round Robin scheduling implemented?
    Topic: CPU Scheduling

    To implement Round Robin scheduling, we keep the ready queue as a FIFO queue of processes. New processes are added to the tail of the ready queue. The CPU scheduler picks the first process from the ready queue, sets a timer to interrupt after 1 time quantum, and dispatches the process. One of the two things will then happen: 1) The process may have a CPU burst of less than 1 time quantum, in which case the process itself will release the CPU voluntarily. The scheduler will then proceed to the next process in the ready queue. 2) If the CPU burst of the currently running process is longer than one time quantum, the timer will go off and cause an interrupt to the operating system. A context switch will happen, the current process will be put at the tail of the ready queue, and the newly scheduled process will be given the CPU.

  36. What are the advantages and disadvantages of the Round Robin scheduling algorithm?
    Topic: CPU Scheduling

    Advantages: 1) It is simple and easy to implement. 2) It is fair: every process gets an equal share of the CPU, so no process suffers starvation. 3) It gives good response time, which makes it well suited for time-sharing systems. Disadvantages: 1) The average waiting time under the RR policy is often quite long. 2) Its performance depends heavily on the size of the time quantum: if the quantum is too large, RR degenerates into FCFS; if it is too small, frequent context switching causes high overhead. 3) It does not give priority to short or interactive processes over long ones.

  37. Out of Shortest Remaining Time First (SRTF) and Round Robin scheduling algorithms, which one is best suited for a time-sharing system where response time is an important performance criterion? Give reasons.
    Topic: CPU Scheduling

    Typically, Round Robin has a higher average turnaround time than SJF/SRTF, but a better (shorter) response time. In time-sharing systems, a shorter response time for a process is more important than a shorter turnaround time, because many users interact with the system simultaneously. Thus, the Round Robin scheduler matches the requirements of time-sharing systems better than the SJF algorithm. The SJF scheduler is better suited for batch systems, in which minimizing the turnaround time is the main criterion.

  38. Why is indefinite blocking (starvation) a major problem with priority scheduling algorithms? How can it be solved?
    Topic: CPU Scheduling

    A major problem with priority scheduling algorithms is indefinite blocking (or starvation). A process that is ready to run but lacking the CPU can be considered blocked — waiting for the CPU. A priority scheduling algorithm can leave some low-priority processes waiting indefinitely for the CPU, because higher-priority processes keep arriving and are always scheduled first. Legend has it that when they were phasing out the IBM 7094 at MIT in 1973, they found a process stuck in the ready queue since 1967! This problem can be solved by aging: gradually increasing the priority of processes that wait in the system for a long time, so that every process eventually gets the CPU.

  39. Differentiate between turnaround time and response time.
    Topic: CPU Scheduling

    Turnaround time is the interval from the time of submission of a process to the time of its completion, i.e., it includes the time spent waiting in the ready queue, executing on the CPU, and doing I/O. Response time is the time from the submission of a request until the first response (first output) is produced. It measures how soon the system starts responding, which is important in interactive systems.

  40. Define waiting time with respect to CPU scheduling. How does waiting time relate to the evaluation of CPU scheduling algorithms?
    Topic: CPU Scheduling

    Waiting time is the total time a process spends waiting in the ready queue. It is one of the important evaluation criteria (metrics) for CPU scheduling algorithms, because CPU scheduling does not affect the time a process spends executing or doing I/O — it affects only the amount of time the process spends waiting in the ready queue. CPU schedulers aim at minimizing the average waiting time of processes; however, the average waiting time is different for different scheduling algorithms, so algorithms are compared on the basis of the average waiting time they produce for a given workload.

  41. Which scheduling algorithm is best according to the waiting time criterion? Also classify the following algorithms as preemptive or non-preemptive: FCFS, SJF, SRTF, Priority, Round Robin.
    Topic: CPU Scheduling

    The Shortest Job First (SJF) algorithm is the best (optimal) scheduling algorithm according to the waiting time criterion, because it gives the minimum average waiting time for a given set of processes. Its preemptive version, Shortest Remaining Time First (SRTF), is optimal when processes arrive over time. Classification: 1) FCFS: Non-preemptive. 2) SJF: Can be preemptive or non-preemptive. 3) SRTF: Preemptive (it is the preemptive version of SJF). 4) Priority scheduling: Can be preemptive or non-preemptive. 5) Round Robin: Preemptive (preemption is based on the time quantum).

  42. You may imagine that the multilevel feedback queue (MLFQ) scheduling algorithm is the same as the Shortest Job First scheduling algorithm. Justify your answer, either yes or no.
    Topic: CPU Scheduling

    No, the two algorithms are not the same, although MLFQ tries to approximate the behaviour of SJF. SJF requires knowledge of the length of the next CPU burst of each process in advance, which is generally not available. MLFQ, on the other hand, does not need this information: it learns from the past behaviour of processes. Processes that use little CPU (short or I/O-bound jobs) stay in the higher-priority queues and therefore run first — just as they would under SJF — while processes that use too much CPU time are demoted to lower-priority queues. MLFQ is also preemptive, uses different scheduling algorithms (usually Round Robin) in its queues, and applies aging to prevent starvation, none of which is part of plain SJF.

  43. How does open source software help us to test scheduling algorithms?
    Topic: CPU Scheduling

    The open source software licensing has made it possible for us to test various scheduling algorithms by implementing them in the Linux kernel and measuring their true performance. The major difficulty is the cost of this approach: the expense is incurred in coding the algorithm and modifying the operating system to support it, as well as its required data structures. The other difficulty with any algorithm evaluation is that the environment in which the algorithm will be used keeps changing.

  44. Write down the structure of the software-based solution for the critical section problem.
    Topic: Process Synchronization & Semaphores

    In the software-based solution, each process has the following structure: do { entry section critical section exit section remainder section } while (1); The entry section is the section of code in which the process requests permission to enter its critical section; the exit section follows the critical section; and the rest of the code is the remainder section.

  45. Differentiate between the entry section and the remainder section.
    Topic: Process Synchronization & Semaphores

    Each process must first request permission to enter its critical section. The section of code implementing this request is called the entry section. The remaining code of the process — the part that does not involve the shared data and in which the process does its other work after leaving the critical section — is called the remainder section.

  46. What are the three requirements that a solution to the critical section problem must satisfy?
    Topic: Process Synchronization & Semaphores

    A solution to the critical section problem must satisfy the following three requirements: 1) Mutual Exclusion: If a process is executing in its critical section, then no other process can be executing in its critical section. 2) Progress: If no process is executing in its critical section and some processes wish to enter their critical sections, then only those processes that are not executing in their remainder sections can participate in deciding which will enter its critical section next, and this selection cannot be postponed indefinitely. 3) Bounded Waiting: There exists a bound on the number of times that other processes are allowed to enter their critical sections after a process has made a request to enter its critical section and before that request is granted.

  47. Differentiate between 'progress' and 'bounded waiting' in the critical section problem.
    Topic: Process Synchronization & Semaphores

    Progress: If no process is executing in its critical section and some processes wish to enter their critical sections, then only those processes that are not executing in their remainder section can participate in the decision on which will enter its critical section next, and this selection cannot be postponed indefinitely. Bounded Waiting: There exists a bound on the number of times that other processes are allowed to enter their critical sections after a process has made a request to enter its critical section and before that request is granted.

  48. What assumptions are made while formulating a solution to the critical section problem?
    Topic: Process Synchronization & Semaphores

    While formulating a solution to the critical section problem, the following assumptions are made: 1) Each process executes at a nonzero speed. 2) No assumption can be made regarding the relative speeds of the N processes.

  49. Define race condition. How can this condition be prevented?
    Topic: Process Synchronization & Semaphores

    A situation in which several processes access and manipulate the same data concurrently, and the outcome of the manipulation depends on the particular order in which the access takes place, is called a race condition. To prevent race conditions, concurrent processes must be synchronized: the processes must be prevented from being simultaneously inside the code that accesses the shared data. This is done by identifying the critical sections and ensuring, through software, operating system or hardware based solutions (such as semaphores), that only one process executes in its critical section at a time (mutual exclusion).

  50. Why is process synchronization needed when concurrent processes share data and resources?
    Topic: Process Synchronization & Semaphores

    Concurrent processes or threads often need access to shared data and shared resources. If there is no controlled access to shared data, it is often possible to obtain an inconsistent state of this data. Maintaining data consistency requires mechanisms to ensure the orderly execution of cooperating processes, and hence various process synchronization methods are used.

  51. Analyze the following algorithm (proposed for process Pi, where the other process is Pj) to solve the critical section problem, and explain whether it satisfies the mutual exclusion requirement. Justify your answer. boolean flag[2]; int turn; do { flag[i] = true; turn = j; while (flag[j] && turn == j); critical section flag[i] = false; remainder section } while (1);
    Topic: Process Synchronization & Semaphores

    Yes, the algorithm satisfies mutual exclusion. To enter its critical section, Pi sets flag[i] to true and sets turn to j, asserting that if the other process wishes to enter its critical section, it may do so. If both processes try to enter at the same time, they will attempt to set turn to i and j respectively; however, only one of these assignments will last — the other will be overwritten — so the eventual value of turn decides which process gets to enter its critical section. To prove mutual exclusion, note that Pi enters its critical section only if either flag[j] == false or turn == i. Also, if both processes were executing in their critical sections at the same time, then flag[0] == flag[1] == true. These two observations suggest that P0 and P1 could not have found both conditions in the while statement true at the same time, since the value of turn can be either 0 or 1. Hence, only one process, say P0, must have successfully exited the while statement, and mutual exclusion is preserved. The algorithm also satisfies progress and bounded waiting: a process can be delayed only while flag[j] == true and turn == j, and after Pj leaves its critical section (or sets turn to i), Pi enters its critical section after at most one entry by Pj.

  52. Analyze the following algorithm to solve the critical section problem and identify its shortcomings. do { while (turn != i); critical section turn = j; remainder section } while (1);
    Topic: Process Synchronization & Semaphores

    This solution ensures mutual exclusion, that is, only one process at a time can be in its critical section. However, it does not satisfy the progress requirement, since it requires strict alternation of the processes in the execution of the critical section. For example, if turn == 0 and P1 is ready to enter its critical section, P1 cannot do so even though P0 may be in its remainder section and does not wish to enter. The bounded waiting condition is satisfied, though, because there is an alternation between the turns of the two processes.

  53. Highlight the shortcoming in the following hardware-based solution to the critical section problem: do { while (TestAndSet(lock)); critical section lock = false; remainder section } while (1);
    Topic: Process Synchronization & Semaphores

    The above TestAndSet-based solution is not fully satisfactory because, even though mutual exclusion and progress are satisfied, bounded waiting is not. A process waiting to enter its critical section keeps testing the lock, and there is no guarantee about the order in which waiting processes acquire the lock, so a process may have to wait indefinitely. The same is true for the Swap-based solution: mutual exclusion can be implemented with a global Boolean variable lock initialized to false and a local Boolean variable key for each process, but this solution also satisfies mutual exclusion and progress only, not bounded waiting.

  54. What is the important characteristic of the TestAndSet instruction? What are its advantages?
    Topic: Process Synchronization & Semaphores

    The important characteristic of the TestAndSet instruction is that it is executed atomically. Thus, if two TestAndSet instructions are executed simultaneously (on different processors), they will be executed sequentially in some arbitrary order. Advantages: 1) It is simple to implement and understand. 2) It needs only one memory location (the lock) for arbitrarily many CPUs/processes.

  55. Explain the working of a semaphore. Write the classical definitions of the wait and signal operations, and show how semaphores can be used to solve the n-process critical section problem.
    Topic: Process Synchronization & Semaphores

    Hardware solutions to synchronization problems are not easy to generalize to more complex problems. To overcome this difficulty, we use a synchronization tool called a semaphore. A semaphore S is an integer variable that, apart from initialization, is accessible only through two standard atomic operations: wait and signal. These operations were originally termed P (for wait) and V (for signal). Their classical definitions are: wait(S) { while (S <= 0) ; // no operation S--; } signal(S) { S++; } Modifications to the integer value of the semaphore in the wait and signal operations must be executed indivisibly: when one process is modifying the value of a semaphore, no other process can simultaneously modify that same semaphore value. In addition, in the case of wait(S), the testing of the integer value of S (S <= 0) and its possible modification (S--) must be executed without interruption. We can use semaphores to deal with the n-process critical section problem. The n processes share a semaphore, mutex (standing for mutual exclusion), initialized to 1. Each process Pi is organized as follows: do { wait(mutex); critical section signal(mutex); remainder section } while (1);

  56. What are the drawbacks/disadvantages of using semaphores?
    Topic: Process Synchronization & Semaphores

    The main disadvantage of the semaphore described with busy waiting is that it requires busy waiting. While a process is in its critical section, any other process that tries to enter its critical section must loop continuously in the entry code. This continual looping is clearly a problem in a real multiprogramming system, where a single CPU is shared among many processes: busy waiting wastes CPU cycles that some other process may be able to use productively. This type of semaphore is also called a spinlock. In addition: 1) Semaphores are too low-level; simple algorithms may require more than one semaphore, which increases the complexity of the solution. 2) It is easy to make programming mistakes (e.g., wait(s) followed by wait(s) instead of signal(s)). 3) The programmer must keep track of all calls to wait and signal on the semaphore; if these are not done in the correct order, programmer error can cause deadlock. 4) Semaphores are used both for condition synchronization and for mutual exclusion, and it is difficult to know which meaning any given semaphore may have.

  57. What is a spinlock? Why are spinlocks useful in multiprocessor systems?
    Topic: Process Synchronization & Semaphores

    A semaphore that uses busy waiting is called a spinlock, because the process 'spins' (loops continuously) while waiting for the lock. Spinlocks are useful in multiprocessor systems. The advantage of a spinlock is that no context switch is required when a process must wait on a lock, and a context switch may take considerable time. Thus, spinlocks are useful when locks are expected to be held for short times: while one process spins on one processor, other processes can execute on the other processors.

  58. What are the common data structures used in Lamport's bakery algorithm?
    Topic: Process Synchronization & Semaphores

    Lamport's bakery algorithm, based on the 'first come, first served' numbering scheme used in bakeries and ice-cream stores, uses two shared data structures for n processes: 1) boolean choosing[n]: initialized to false. A process sets choosing[i] = true while it is picking its number, and resets it to false afterwards. 2) int number[n]: initialized to 0. On entering, a process chooses a number one greater than the maximum of the current numbers (number[i] = 1 + max(number[0], ..., number[n-1])). The process holding the smallest (number, process ID) pair enters its critical section first; ties between equal numbers are broken by the process ID. When a process leaves its critical section, it sets number[i] = 0.

  59. Differentiate between independent processes and cooperating processes.
    Topic: Process Synchronization & Semaphores

    An independent process is a process that cannot affect or be affected by any other process executing in the system; it does not need any other external factor to trigger it, and its execution is not influenced by other processes. A cooperating process is a process that can affect or be affected by other processes executing in the system; it works on the occurrence of events and shares data with other processes, so its outcome can affect other parts of the system. Cooperating processes communicate through inter-process communication (IPC).

MIHORA VU – Virtual University Assignment Solutions 2026, Solved Past Papers & All 455+ Courses

Official MIHORA TECH academic repository offering 28,328+ verified study documents for all 455+ Virtual University of Pakistan courses. Access VU Assignment Solution 2026 (Latest Session), Moaaz & Waqar Siddhu solved midterm & final papers, lecture handouts, and quizzes with 100% direct high-speed links.

SPRING 2026 / FALL 2026 ACTIVE SESSION

VU Assignment Solution 2026 (Latest Solved Assignments, GDBs & Quizzes)

Get high-scoring solutions for Assignment 1, Assignment 2, and Graded Discussion Boards across Computer Science, Mathematics, Management, English, and Economics. Compliant with Turnitin similarity limits (< 19%) and official 24-hour grace periods.

Open VU Assignment Solution 2026 Hub →

Popular Virtual University Courses (2026 Solved Papers & Solutions):

CS101 – Introduction to Computing CS201 – Introduction to Programming CS301 – Data Structures CS302 – Digital Logic Design CS401 – Computer Architecture & Assembly Language CS402 – Theory of Automata CS403 – Database Management Systems CS501 – Advance Computer Architecture CS502 – Fundamentals of Algorithms CS504 – Software Engineering - I CS506 – Enterprise Application Development CS601 – Data Communication CS602 – Computer Graphics CS604 – Operating Systems CS605 – Software Engineering - II CS607 – Artificial Intelligence CS610 – Computer Networks CS619 – Final Year Project MTH101 – Calculus & Analytical Geometry MTH202 – Discrete Mathematics MTH301 – Calculus II (Multivariable Calculus) MTH302 – Business Mathematics & Statistics MTH501 – Linear Algebra ENG101 – English Comprehension ENG201 – Business and Technical English Writing MGT101 – Financial Accounting MGT211 – Introduction to Business MGT301 – Principles of Marketing MGT501 – Human Resource Management ACC311 – Fundamentals of Auditing ACC501 – Business Finance STA301 – Statistics and Probability ECO401 – Economics (Micro & Macro) ISL202 – Islamic Studies / Ethics PAK301 – Pakistan Studies PHY101 – Physics - Mechanics & Waves

Complete Directory of All 455 Virtual University Courses & Codes

Browse the complete curriculum of all 455 accredited courses across 27 faculties of Virtual University of Pakistan. Every course includes verified lecture handouts, Moaaz & Waqar Siddhu solved papers, and 2026 assignment solution templates.

Accounting & Finance (16 Courses)

ACC301 – Financial Accounting ACC311 – Fundamentals of Auditing ACC501 – Business Finance BNK601 – Banking Laws & Practices BNK603 – Consumer Banking BNK604 – Commercial Banking BNK610 – Credit & Risk Management in Banking EFIN623 – Economics of Financial Markets FIN611 – Advanced Financial Accounting FIN621 – Financial Statement Analysis FIN622 – Corporate Finance FIN623 – Taxation Management FIN624 – Islamic Banking & Finance FIN625 – Credit & Risk Management FIN630 – Investment Analysis & Portfolio Management FIN722 – Advanced Corporate Finance

Bioinformatics (7 Courses)

BIF101 – Basic Bioinformatics BIF401 – Introduction to Bioinformatics BIF402 – Computational Biology Methods BIF501 – Genomics & Proteomics BIF601 – Bioinformatics Algorithms BIF602 – Structural Bioinformatics BIF604 – Systems Biology

Biological Sciences (16 Courses)

BIO101 – Basic Biology BIO102 – Introductory Biology & Diversity BIO201 – Cell Biology BIO202 – Biochemistry BIO203 – General Genetics BIO204 – Biochemical Techniques BIO301 – Molecular Biology BIO302 – Animal Physiology BIO303 – Developmental Biology BIO401 – Ecology & Evolutionary Biology BIO502 – Immunology & Pathology BIO503 – Pharmacology & Toxicology BIO504 – Applied Microbiology BIO505 – Environmental Biotechnology BIO506 – Forensic Biology BIO731 – Advanced Molecular Genetics

Virtual University of Pakistan (43 Courses)

BNK611 – Economic Ideology in Islam BT613T – Agricultural Biotechnology CS306 – Introduction to Python CS441 – Big Data Concepts CS442 – Introduction to Data Science CS620 – Modeling & Simulation CS701 – Theory of Computation CS703 – Operating Systems CS704 – Advanced Computer Architecture ECO302 – Microeconomics EDU407 – EDU407 ENG401 – Introduction to Literature: Short Story and Poetry GSC201 – Teaching of General Science MCM516 – TV News Reporting and Production MGMT611 – Human Relations MGMT629 – Crisis Management MGT201 – Financial Management MGT401 – Financial Accounting II MGT404 – MGT404 MGT504 – Organization Theory & Design MGT520 – International Business MGT522 – MGT522 MGT601 – SME Management MGT603 – Strategic Management MGT613 – Production and Operations Management MGT703 – Strategic Management MGT705 – Advanced Cost and Management Accounting MGT713 – Production / Operations Management MTH102 – Basic Algebra and Trigonometry MTH201 – Multivariable Calculus MTH304 – Mechanics MTH403 – MTH403 MTH404 – MTH404 MTH405 – MTH405 MTH621 – Real Analysis I MTH633 – Group Theory MTH642 – Fluid Mechanics MTH643 – MTH643 PAK303 – PAK303 PSC401 – Public International Law PSY409 – Positive Psychology SE601 – Software Construction & Development SE602 – Software Re—engineering

Bio-Technology (34 Courses)

BT101 – Ecology, Biodiversity & Evolution BT102 – Microbiology BT201 – Biotechnology Fundamentals BT301 – Recombinant DNA Technology BT302 – Cell and Tissue Culture BT401 – Genetic Engineering BT402 – Fermentation Technology BT403 – Agricultural Biotechnology BT404 – Medical Biotechnology BT405 – Industrial Biotechnology BT406 – Nanobiotechnology BT501 – Biochemical Engineering BT502 – Biosafety & Bioethics BT503 – Molecular Diagnostics BT504 – Stem Cell Technology BT505 – Food Biotechnology BT511 – Vaccine Technology BT512 – Drug Design & Development BT513 – Genomics & Functional Proteomics BT514 – Enzyme Technology BT601 – Advanced Genetic Engineering BT602 – Bioinformatics in Biotechnology BT603 – Bioprocess Engineering BT604 – Aquatic Biotechnology BT605 – Environmental Bioremediation BT611 – Synthetic Biology BT612 – Metabolic Engineering BT613 – Biofuels and Bioenergy BT614 – Clinical Research in Biotechnology BT693 – Research Project in Biotechnology BT732 – Advanced Molecular Biology Seminar BT734 – Advanced Cellular Biotechnology BT735 – Current Topics in Biotechnology NTBT301 – Nanotechnology in Biotechnology

Chemistry (2 Courses)

CHE201 – General Chemistry CHE301 – Organic Chemistry

Computer Science (55 Courses)

CS000 – Introduction to Computer Fundamentals CS001 – Computer Proficiency License CS101 – Introduction to Computing CS201 – Introduction to Programming CS202 – Web Design & Development CS204 – Cyber Law & Intellectual Property CS205 – Information Security Management CS206 – Ethical Hacking & Defense CS301 – Data Structures CS302 – Digital Logic Design CS304 – Object Oriented Programming CS310 – Introduction to Programming (Python) CS311 – Introduction to Web Services Development CS312 – Mobile Application Development CS314 – Embedded Systems & IoT CS315 – Web Engineering CS401 – Computer Architecture & Assembly Language CS402 – Theory of Automata CS403 – Database Management Systems CS405 – Mobile Computing CS407 – Cloud Computing Fundamentals CS408 – Human Computer Interaction CS409 – Ethical & Legal Issues in Computing CS410 – Design & Analysis of Algorithms CS411 – Visual Programming CS420 – Game Design and Development CS432 – Network Security CS435 – Cloud Computing Infrastructure CS501 – Advance Computer Architecture CS502 – Fundamentals of Algorithms CS505 – Agile Software Development CS506 – Enterprise Application Development CS507 – Information Systems CS508 – Modern Programming Languages CS510 – Compiler Construction CS511 – Distributed Systems CS521 – Data Science Principles CS601 – Data Communication CS602 – Computer Graphics CS603 – Software Architecture CS604 – Operating Systems CS606 – Compiler Design & Construction CS607 – Artificial Intelligence CS608 – Digital Signal Processing CS609 – System Programming CS610 – Computer Networks CS614 – Data Warehousing CS619 – Final Year Project CS621 – Information Retrieval Techniques CS625 – Formal Methods in Software Engineering CS627 – Computer Vision & Pattern Recognition CS636 – Big Data Analytics CS708 – Advanced Computer Graphics CS713 – Advanced Software Architecture CS718 – Advanced Artificial Intelligence

Software Engineering (4 Courses)

CS504 – Software Engineering - I CS605 – Software Engineering - II CS611 – Software Quality Assurance CS615 – Software Project Management

Statistics (18 Courses)

DSTA630 – Data Science Research Methods STA000 – Basic Statistics Fundamentals STA100 – Foundations of Statistics STA301 – Statistics and Probability STA304 – Statistical Inference STA404 – Experimental Design STA406 – Sampling Techniques STA408 – Biostatistics and Epidemiology STA630 – Research Methods in Social Sciences STA631 – Advanced Statistical Methods STA632 – Multivariate Analysis STA641 – Non-Parametric Methods STA642 – Econometric Models STA730 – Advanced Research Methodology in Statistics STAT100 – Statistics Fundamentals STAT404 – Applied Statistical Modeling STAT408 – Statistical Computing STAT730 – Advanced Biostatistics

Education (44 Courses)

ECE101 – Introduction to Early Childhood Care & Education EDU101 – Foundations of Education EDU201 – Learning Theories & Applications EDU205 – Classroom Management EDU301 – General Methods of Teaching EDU302 – Human Development & Learning EDU303 – School, Community and Teacher EDU304 – Educational Assessment & Evaluation EDU305 – Curriculum Development & Instruction EDU306 – Contemporary Trends in Education EDU401 – Critical Thinking and Reflective Practices EDU402 – Educational Leadership & Management EDU403 – Art, Craft & Calligraphy in Education EDU404 – Teaching of English EDU405 – Teaching of Mathematics EDU406 – Teaching of General Science EDU410 – ICT in Education EDU411 – Teaching of Social Studies EDU430 – Information & Communication Technology in Teaching EDU431 – Test Development & Measurement EDU433 – Educational Statistics EDU501 – Educational Psychology EDU505 – Guidance and Counseling in Schools EDU510 – Qualitative Research in Education EDU512 – Comparative Education EDU514 – Special Education Principles EDU515 – Early Childhood Education Curriculum EDU516 – Educational Technology & Media EDU601 – Philosophy of Education EDU602 – Educational Planning and Policy EDU604 – Educational Administration & Supervision EDU630 – Research Methods in Education EDU654 – Teacher Education in Pakistan EDU702 – Advanced Seminar in Educational Leadership EDU705 – Advanced Educational Policy Analysis EDUA305 – Applied Curriculum Development EDUA403 – Elementary Arts Education EDUA405 – Pedagogy of Mathematics EDUA516 – Educational Media Design EDUA630 – Action Research in Educational Settings MEDU402 – Master Level Educational Leadership MEDU406 – Science Teaching Pedagogies MEDU430 – Advanced ICT in Education MEDU601 – Advanced Philosophy of Education

Economics (11 Courses)

ECO401 – Economics (Micro & Macro) ECO402 – Microeconomics Analysis ECO403 – Macroeconomics Analysis ECO404 – Managerial Economics ECO406 – Development Economics ECO501 – Monetary Economics ECO601 – International Economics ECO603 – Public Sector Economics ECO606 – Agricultural Economics ECO607 – Environmental & Resource Economics ECO610 – Econometrics Principles

Management Sciences (26 Courses)

EMG525 – Engineering Project Management MGMT614 – Leadership & Team Building MGMT615 – Project Management Practices MGMT617 – Project Management Methodologies MGMT622 – Operations Management MGMT623 – Supply Chain Management MGMT625 – Knowledge Management Systems MGMT627 – Global Business Strategy MGMT628 – Strategic Management MGMT630 – Business Strategy & Policy MGMT631 – Innovation Management MGT101 – Financial Accounting MGT111 – Introduction to Public Administration MGT211 – Introduction to Business MGT301 – Principles of Marketing MGT402 – Cost & Management Accounting MGT411 – Money & Banking MGT501 – Human Resource Management MGT502 – Organizational Behaviour MGT503 – Principles of Management MGT510 – Total Quality Management MGT602 – Entrepreneurship MGT604 – Management of Financial Institutions MGT610 – Business Ethics & Corporate Governance MGT611 – Business & Labor Law MGTE630 – Business Management Strategy

English (34 Courses)

ENG001 – Basic English Grammar & Composition ENG101 – English Comprehension ENG201 – Business and Technical English Writing ENG301 – Business Communication ENG501 – History of English Language ENG502 – Introduction to Linguistics ENG503 – English Morphology and Syntax ENG504 – Sociolinguistics ENG505 – Phonetics & Phonology ENG506 – World Englishes ENG507 – Psycholinguistics ENG508 – Semantics & Pragmatics ENG509 – English for Specific Purposes (ESP) ENG510 – Language Testing & Evaluation ENG511 – Syllabus Design & Materials Development ENG512 – Stylistics & Literary Analysis ENG513 – Second Language Acquisition (SLA) ENG514 – Classical Poetry ENG515 – Classical Drama ENG516 – Research Methodology in Linguistics ENG517 – Modern Poetry ENG518 – Modern Drama ENG519 – Classical Novel ENG520 – Modern Novel ENG521 – American Literature ENG522 – Postcolonial Literature ENG523 – Continental Literature & Criticism ENG524 – Literary Criticism & Theory ENG525 – Discourse Analysis ENG526 – Applied Linguistics in Education ENG527 – Creative Writing & Composition ENG528 – Corpus Linguistics ENG529 – Translation Studies & Theory FENG301 – Functional English for Professionals

Islamic Studies (4 Courses)

ETH100 – Ethics (For Non-Muslim Students) ETH201 – Ethics & Moral Philosophy (For Non-Muslims) ISL201 – Islamic Studies ISL202 – Islamic Studies / Ethics

General Guides (1 Courses)

GENERAL – General University Resources, Guides & Handbooks

General Sciences (1 Courses)

GSC101 – General Science

Human Resources (4 Courses)

HRM613 – Human Resource Development HRM617 – Compensation & Benefits Management HRM624 – Conflict & Negotiation Management HRM627 – Strategic Human Resource Management

Information Technology (4 Courses)

IT430 – E-Commerce & Digital Business IT601 – Network Administration IT602 – Database Administration ITU430 – E-Commerce Systems

Microbiology (4 Courses)

MB501 – General Microbiology & Microbial Diversity MB502 – Microbial Physiology & Metabolism MB504 – Medical Microbiology MIC501 – Applied Microbiology

Mass Communication (22 Courses)

MCD401 – Media Content Development MCD403 – Media Ethics & Professional Standards MCM000 – Introduction to Communication Fundamentals MCM101 – Introduction to Mass Communication MCM301 – Communication Skills MCM304 – Mass Media in Pakistan MCM310 – Radio Broadcasting & Audio Media MCM311 – Radio & Television Production MCM401 – Fundamentals of Public Relations MCM404 – Electronic Media Content Creation MCM411 – News Writing and Reporting MCM431 – Digital Media & Online Journalism MCM501 – Development Support Communication MCM511 – Media Ethics, Cyber Laws & Regulation MCM514 – Feature, Column & Editorial Writing MCM517 – Advertising Strategy & Campaigns MCM520 – Print Media Design & Layout MCM531 – International & Cross-Cultural Communication MCM601 – Theories of Mass Communication MCM604 – Communication Research Methodology MCM610 – Cyber Journalism & Web Publishing MCMP310 – Radio & Audio Production Practical

Marketing (5 Courses)

MKT501 – Marketing Management MKT530 – Consumer Behaviour MKT610 – Customer Relationship Management (CRM) MKT621 – Advertising & Brand Management MKT630 – International Marketing Strategy

Mathematics (20 Courses)

MTH001 – Elementary Mathematics MTH100 – General Mathematics MTH101 – Calculus & Analytical Geometry MTH104 – Sets & Logic MTH202 – Discrete Mathematics MTH301 – Calculus II (Multivariable Calculus) MTH302 – Business Mathematics & Statistics MTH401 – Differential Equations MTH501 – Linear Algebra MTH601 – Operations Research MTH603 – Numerical Analysis MTH622 – Vector & Tensor Analysis MTH631 – Real Analysis MTH632 – Complex Analysis MTH634 – Topology MTH641 – Functional Analysis MTH644 – Mathematical Methods MTH645 – Mechanics MTH646 – Differential Geometry MTH647 – Fluid Mechanics

Social Studies (3 Courses)

PAK301 – Pakistan Studies PAK302 – History of Pakistan PAK522 – Ideology & Constitution of Pakistan

Physics (3 Courses)

PHY000 – Foundational Physics PHY101 – Physics - Mechanics & Waves PHY301 – Circuit Theory

Psychology (23 Courses)

PSY101 – General Psychology PSY401 – Clinical Psychology Fundamentals PSY402 – Social Psychology PSY403 – Developmental Psychology PSY404 – Abnormal Psychology PSY405 – Personality Theories & Assessment PSY406 – Educational Psychology Applications PSY407 – Experimental Psychology & Lab Methods PSY408 – Health Psychology PSY502 – History and Systems of Psychology PSY504 – Cognitive Psychology PSY505 – Psychological Testing & Measurement PSY510 – Positive Psychology & Well-being PSY511 – Counseling Psychology Principles PSY512 – Organizational & Industrial Psychology PSY513 – Neuropsychology Fundamentals PSY515 – Forensic & Criminal Psychology PSY516 – Cross-Cultural Psychology PSY610 – Neurological Basis of Behavior PSY611 – Psychopathology & Diagnostics PSY631 – Psychological Assessment Practicum PSY632 – Research Methods in Psychology PSYP631 – Psychological Assessment Lab Practical

Sociology (14 Courses)

SOC101 – Introduction to Sociology SOC201 – Pakistani Society and Culture SOC301 – Social Psychology & Society SOC302 – Cultural Anthropology SOC401 – Social Research Methods SOC402 – Classical Sociological Theories SOC403 – Social Change & Modernization SOC404 – Urban Sociology SOC601 – Rural Sociology & Community Development SOC602 – Gender Studies & Society SOC605 – Criminology & Juvenile Delinquency SOC608 – Sociology of Development SOC609 – Sociology of Health & Medicine SOC610 – Demography & Population Dynamics

Urdu Literature (2 Courses)

URD101 – Functional Urdu (Urdu Zaban-o-Adab) URDU101 – Urdu Language & Literature

Zoology (35 Courses)

ZOO101 – Principles of Animal Life I ZOO102 – Principles of Animal Life II ZOO103 – Animal Diversity: Invertebrates ZOO111 – Fundamentals of Zoology ZOO201 – Animal Diversity: Chordates ZOO202 – Animal Form & Function I ZOO203 – Animal Form & Function II ZOO301 – Animal Physiology ZOO302 – Cell & Molecular Biology in Zoology ZOO307 – Principles of Ecology ZOO401 – Evolution & Principles of Systematics ZOO403 – Animal Behavior & Sociobiology ZOO404 – Biostatistics for Zoologists ZOO405 – General Developmental Biology ZOO501 – Developmental Biology ZOO502 – Environmental Biology ZOO503 – Biostatistics in Zoological Research ZOO504 – Zoogeography & Paleontology ZOO505 – Wildlife of Pakistan & Conservation ZOO506 – Endocrinology ZOO507 – Animal Diversity & Behavior ZOO509 – Fish Biology & Fisheries Science ZOO510 – General Microbiology & Immunology ZOO511 – Immunology & Serology ZOO512 – Parasitology & Vectors ZOO513 – Applied Entomology ZOO514 – Biochemistry of Animals ZOO515 – Genetics & Population Biology ZOO516 – Aquaculture & Fisheries Management ZOO517 – Toxicology & Environmental Health ZOO518 – Comparative Vertebrate Anatomy ZOO519 – Mammalogy ZOO520 – Ornithology (Bird Biology) ZOO603 – Applied Parasitology & Vector Biology ZOO630 – Research Methodology in Zoology

Core Student Calculators & Rules Handbooks

Frequently Asked Questions – MIHORA VU Study Library

Where can I download VU Assignment Solution 2026 for CS101, CS201, MTH101, and all subjects?

MIHORA VU (https://study.mihora.tech/vu-assignment-solution-2026) offers verified 2026 assignment solutions, GDB answers, quiz files, and Dev-C++ code templates for all 455 Virtual University courses with 100% free direct downloads.

What is the 24-hour assignment grace period in Virtual University?

Virtual University gives students an automatic 24-hour grace period after the official assignment deadline. Submissions during this grace window are awarded full credit with 0 marks deduction.

How to avoid zero marks in VU assignments due to Turnitin plagiarism?

Never copy-paste solutions directly from YouTube or public groups. Keep Turnitin similarity under 19% by renaming code variables, rearranging logical statements, and writing custom explanations.

Where can I get Moaaz and Waqar Siddhu solved midterm and final past papers?

MIHORA VU hosts over 28,328 verified documents including complete Moaaz and Waqar Siddhu past paper collections for all 455 VU subjects, available via direct download without registration.

What is the 20% Two-Half passing rule in Virtual University?

Students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterms) AND independently at least 20% in the Final Term exam paper to pass any course.