My name is Taufik Algi Fahri

OS202

View on GitHub

HOME


Top 10 List of Week 08

  1. CPU Scheduling Algorithms
    There are mainly six types of process scheduling algorithms:
    1. First Come First Serve (FCFS)
    2. Shortest-Job-First (SJF) Scheduling
    3. Shortest Remaining Time
    4. Priority Scheduling
    5. Round Robin Scheduling
    6. Multilevel Queue Scheduling
  2. Two fundamental issues in multiprocessing
    A general purpose multiprocessor should be scalable, i.e. show higher performance when more hardware resources are added to the machine. Architects of such multiprocessors must address the loss in processor efficiency due to two fundamental issues: long memory latencies and waits due to synchronization events. It is argued that a well designed processor can overcome these losses provided there is sufficient parallelism in the program being executed. The detrimental effect of long latency can be reduced by instruction pipelining, however, the restriction of a single thread of computation in von Neumann processors severely limits their ability to have more than a few instructions in the pipeline. Furthermore, techniques to reduce the memory latency tend to increase the cost of task switching. The cost of synchronization events in von Neumann machines makes decomposing a program into very small tasks counter-productive. Dataflow machines, on the other hand, treat each instruction as a task, and by paying a small synchronization cost for each instruction executed, offer the ultimate flexibility in scheduling instructions to reduce processor idle time.

  3. Preemptive Scheduling
    Preemptive Scheduling is a scheduling method where the tasks are mostly assigned with their priorities. Sometimes it is important to run a task with a higher priority before another lower priority task, even if the lower priority task is still running. At that time, the lower priority task holds for some time and resumes when the higher priority task finishes its execution.

  4. Non-Preemptive Scheduling
    Non-preemptive Scheduling is used when a process terminates, or a process switches from running to waiting state. In this scheduling, once the resources (CPU cycles) is allocated to a process, the process holds the CPU till it gets terminated or it reaches a waiting state. In case of non-preemptive scheduling does not interrupt a process running CPU in middle of the execution. Instead, it waits till the process complete its CPU burst time and then it can allocate the CPU to another process.

  5. Dispatcher
    A dispatcher is a special program which comes into play after the scheduler. When the scheduler completes its job of selecting a process, it is the dispatcher which takes that process to the desired state/queue. The dispatcher is the module that gives a process control over the CPU after it has been selected by the short-term scheduler.

  6. CPU Utilization
    CPU utilization is the sum of work handled by a Central Processing Unit. It is also used to estimate system performance. CPU utilization can vary according to the type and amount of computing task because some tasks require heavy CPU time while others require less CPU time.

  7. Scheduling Criteria
    There are several different criteria to consider when trying to select the “best” scheduling algorithm for a particular situation and environment, including:
    • CPU utilization - Ideally the CPU would be busy 100% of the time, so as to waste 0 CPU cycles. On a real system CPU usage should range from 40% ( lightly loaded ) to 90% ( heavily loaded. )
    • Throughput - Number of processes completed per unit time. May range from 10 / second to 1 / hour depending on the specific processes.
    • Turnaround time - Time required for a particular process to complete, from submission time to completion. ( Wall clock time. ) Waiting time - How much time processes spend in the ready queue waiting their turn to get on the CPU.
      • ( Load average - The average number of processes sitting in the ready queue waiting their turn to get into the CPU. Reported in 1-minute, 5-minute, and 15-minute averages by “uptime” and “who”. )
    • Response time - The time taken in an interactive program from the issuance of a command to the commence of a response to that command. In general one wants to optimize the average value of a criteria ( Maximize CPU utilization and throughput, and minimize all the others. ) However some times one wants to do something different, such as to minimize the maximum response time. Sometimes it is most desirable to minimize the variance of a criteria than the actual value. I.e. users are more accepting of a consistent predictable system than an inconsistent one, even if it is a little bit slower.
  8. Contention Scope
    The word contention here refers to the competition or fight among the User level threads to access the kernel resources. Thus, this control defines the extent to which contention takes place. It is defined by the application developer using the thread library. Depending upon the extent of contention it is classified as Process Contention Scope and System Contention Scope.

  9. Load Balancing
    Load balancing is defined as the methodical and efficient distribution of network or application traffic across multiple servers in a server farm. Each load balancer sits between client devices and backend servers, receiving and then distributing incoming requests to any available server capable of fulfilling them.

  10. Processor Affinity
    Processor Affinity also called CPU pinning, allows the user to assign a process to use only a few cores. Technically you can bind and unbind a process or thread to CPU or CPUs which here can be termed as CPU cores. But the real question is why is such an option available, and is there an advantage of setting processor affinity. Processor Affinity is useful if you have a heavy program like video rendering. When you dedicated a core for the video editing program, it ensures that the core of the processor is always dedicated to the task. It improves performance because it reduces reduce cache problem as there is no delay with a dedicated core.