• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/9

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

9 Cards in this Set

  • Front
  • Back
A Quantum
Is the amount of time a process is allowed to access the CPU un-interrupted.
If the Quantum is very small
A process might not have enough time to execute and can result in too many context switches giving bigger overheads and loss of CPU efficiency, this can result in the degeneration of the process from Round Robin to FCFS.
If the Quantum is too large
This may cause poor response time to short interactive requests.
How to tell if the Quantum size if right?
When the process is maintaining good performance.

There are minimal overheads and maximum use of resources.

The user is not waiting longer than necessary for their results.
Does a switch between two threads of the same process always involve less work than a switch between two threads in different processes?
Not always, switching between threads belonging to the same process is much faster than switching to a thread from different process because threads from different processes requires a context switch whereas threads in the same process can access all the information available from the process and can share common code and data.
In the ULT/KLT combined approach a thread may migrate from one process environment to another.  This allows a thread to be easily moved among distinct systems
Why are all other threads within the process blocked when a ULT in a process issues a blocking call?
The underlying kernel thread also blocks. Therefore, all other user threads within the application are unable to use the kernel thread to make use of the system's processors. Even though a thread within the process might still be running the kernel assigns one process to only one processor at a time, multiple threads are unable to run on multiprocessors.
With the combined ULT/KLT approach, why can a multithreaded program run faster on a single processor machine than an equivalent single threaded program?
A multi-threaded program can only run faster on a multiprocessor computer.
On a single processor machine, while a multi-threaded program will run no faster, a multi-threaded application can appear to be more responsive to user interaction, because the operating system can give the illusion that multiple activities within the same program are running at the same time.
Process P1 is executing on the CPU and it issues a ‘read’ from a file system call. List the main steps taken by the operating system from this point on until the system call is completed and process P1 starts executing the next instruction?
1. Push parameter on to the stack.
2. Call the library routine, which involves pushing the return address on to the stack and jumping to the routine.
3. Put the system call number for read in a register. This requires assembly language.
4. Trap to the kernel. This enters the operating system proper and shifts the computer to privileged mode. Assembly language is again used.
5. The envelope uses the system call number to access a table of pointers to find the handler for this system call.
6. The read system call handler processes the request.
7. Some magic instruction returns to user mode and jumps to the location right after the trap.
8. The library routine returns
9. The stack is popped (ending the function call read).
List three advantages of ULTs over KLTs.
a) The process is Terminated
b) The process goes to a wait queue
c) Returns to ready queue & saves state to PCB
d) In wait queue saves state to PCB & reloads state once call executed.