Hung_Nguyen_HA5

docx

School

George Mason University *

*We aren’t endorsed by this school

Course

342

Subject

Computer Science

Date

Feb 20, 2024

Type

docx

Pages

2

Uploaded by hungnguyen090600

Report
Hung Nguyen IT342-DL1 IT 342 HW 5 (100 Pts) 1. How does a Real-time system differ from other systems? Real-time system is differed from other systems because it guarantees that all interrupts will be taken care of within a certain maximum amount of time (as fast as possible). In another word, it is an operating system intended to serve real time applications that process data as it comes in. On the other hand, general-purpose operating systems may take a little bit of time to respond to a given interruption. 2. What is the difference between a hard and soft deadline? Hard deadline means that if missed deadline, it will result in total system failure, but very few systems have this requirement. On the other hand, soft deadline means that even if the system fails to meet the deadline, possibly more than once the system is not considered to have failed. 3. Define CPU utilization, throughput, turnaround time, waiting time and response time. What is the significance of response time? CPU utilization is how active the CPU is. Throughput is the number of processes that are completed per time unit. Turnaround time is the time from submission of a process until it completes. Waiting time is time spent by a process waiting for the CPU. Response time is the time it takes to start responding, not the time it takes to output the response. Importantly, it is the time till the first response and not the completion of process execution. 4. What does it mean for the dispatcher to preempt a process? Preemption is when a process is switched by the dispatcher from the CPU before it completes. Similarly, it means forcefully taking away of the processor from one process and allocating it to another process. The reason behind this includes higher priority process, set time has passed, and more. 5. What are the advantages of the multilevel feedback algorithm vs. the multilevel queue algorithm? What is the difference between preemptive and non-preemptive scheduling? Multilevel feedback queue maintains several queues, allows the process to change queues. Also, each queue can have different scheduling algorithm, and it is very complex. On the other hand, multilevel queue maintains separate queues for each group of processes that remain in that queue. Most of the time it is used for priority, and if that is not the case, then the queues will have priority. It is very complex and can lead to starvation. Preemptive scheduling is used when a process switches from running state to ready state or from the waiting state to ready state. On the other hand, non-preemptive scheduling is used when a process terminates, or a process switch from running to waiting state.
Hung Nguyen IT342-DL1 6. In a Uniprocessor scheduler what is the best algorithm? Why? The best algorithm for uniprocessor scheduler is First Come First Serve (FCFS) because it is easy to implement, not preemptive, and processes are entering the back of the queue and are taken from the top. This will result in a high wait time, but it is great for all long, CPU bound processes. Also, it is short penalized, and I/O bound processes penalized. 7. What are some of the concerns about multiprocessor scheduling? There are some considerations about multiprocessor scheduling: Static – once assigned to a CPU, a process stays with that CPU. o Some CPUs can be overworked while others have nothing Dynamic – any process can be assigned to any CPU at any time. o Communication between processes is difficult o A common queue is maintained for all the processes. They are scheduled to any available processor. In its life cycle, the process may be executed on different processors at different times. 8. How would CPU utilization be used as a performance criterion in a scheduling algorithm? The main objective of any CPU scheduling algorithm is to keep the CPU as busy as possible. Theoretically, CPU utilization can range from 0 to 100 but in a real-time system, it varies from 40 to 90 percent depending on the load upon the system.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help