Chapter 18 Flashcards
how we can change nice value of priority
By nice command
Does round robin algorithm suits for time sharing system
Yes
What are 2 methods for algorithm evaluation
- Analytic Evaluation
2. Implementation
What is Analytic Evaluation
The algorithm and some system workload are used to produce a formula which gives the performance of the algorithm for that workload.
What are 3 ways in analytic evaluation
- Deterministic modeling (compare workloads for algorithms)
- Simulation
- Queuing models (use mathematical formulas)
What is Implementation
Implement all these algorithms in real system and give these systems to actual users to see response.
What is queuing modeling
Computer system viewed as a network of queues and servers: ready queue, I/O queue, event queues, CPUs, I/O device controllers, etc.
What is simulation
Programming model for the computer system
What is shared data serialization
If there are multiple process want to access same data, we make sure only one process access data at one time.
What is bounded-buffer problem (producer and consumer problem)
Bounded buffer problem, which is also called producer consumer problem, is one of the classic problems of synchronization.
A producer tries to insert data into an empty slot of the buffer. A consumer tries to remove data from a filled slot in the buffer. As you might have guessed by now, those two processes won’t produce the expected output if they are being executed concurrently.
There needs to be a way to make the producer and consumer work in an independent manner.
What is the solution of bounded-buffer problem
One of the solution is use of counter variable that keep records how much slots are in use. Counter variable is shared variable. Which slots are being in use, will tell an in variable that keep record of index value of that slot.
What is race condition
It is related to synchronization problem. the situation where several processes access and manipulate shared data concurrently, the final value of the data depends on which process finishes last.
What is critical section
A piece of code in a cooperating process in which the process may try to access shared data (e.g. variable, database, file etc)
What is critical section problem
Serialize executions of critical sections in coorporating processes
What are 3 solutions of critical problem
- Software based solutions
- Hardware based solutions
- Operating system based solutions