100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Brunel - Computer Science - CS2005 Networks and Operating Systems Exam Prep £16.49   Add to cart

Exam (elaborations)

Brunel - Computer Science - CS2005 Networks and Operating Systems Exam Prep

 23 views  0 purchase

Mock Exam questions with exemplar answers, prep and solutions to go about solving these type of questions. This was the exact prep document I made to go on and achieve a first class in this module and exam.

Preview 3 out of 19  pages

  • January 6, 2024
  • 19
  • 2019/2020
  • Exam (elaborations)
  • Questions & answers
All documents for this subject (3)
avatar-seller
cslbrunel
Processes

Q2.

“How is a process scheduled in an operating system? Your answer should consider the relationship
between the process lifecycle, process control blocks, scheduler queues and the operating system
scheduler.”

-define process

A process is recognised as being a task, a computer program in execution.



-explain process lifecycle (five states that a process can be in)



Firstly, in order to explain how a process is scheduled in an operating system, it is crucial to
comprehend process and the phases throughout its lifecycle. The process can be running or idle but
can only run one at a time. When a process is first created, it is placed in the new state and once this
is complete it will be placed in the ready state. Once a CPU core is available to execute a process, it
will transfer from the ready state to the running state to execute the process. The execution of a
process may not be as simple and could result in an interruption. This would place the process back
into the ready state – additionally the process may need to initiate a longer operation and therefore
will place the process into the waiting state. Once the event occurs or is complete, it will then
transfer to the ready phase. Once the process has been complete and executed from the running
phase, it will exit the state and enter the terminated phase. However, the process may not result in a
success exit code and may terminate if an error occurs.



-state diagram

,-explain process control blocks (What information is held in the PCB)

The role of the process control block (PCB) is to store the information regarding a process. Each
process in the operating system is represented by a process control block. The process control block
includes the process state. This is able to represent what state a process is in, within a particular
moment. The program counter indicates the address of the next instruction to be executed within
the process. Within the process control block, CPU registers are also included, which represents the
registers that are being used by a process. For example, index registers, stack pointers or general
process registers. Additionally, CPU scheduling information includes the priority of the processes as
well as the pointers to scheduling queue or any other scheduling parameters. The memory
management information represents the memory that is being used by a process, which includes the
value of the base and limit registers or the segments tables. The accounting information includes the
amount of resources being used. For example, the time, CPU or memory and will store this
information in the process control block. Lastly, the I/O status information which represents the I/O
devices allocated to a process.




-explain scheduler queues (How many scheduling queues are there?) Give an example in relation to
the process lifecycle

The process scheduler has the role to organise which processes to run and therefore needs
scheduler queues. This includes the three, Job queue which includes all processes in the system as
whenever a process enters the system it is placed in the Job queue. Additionally, the ready queue
focuses on the processes that are stored within the main memory and waiting to be executed. Lastly,
the device queue which contains a list of processes that are waiting for any I/O device. The device
queue is available to store the list of processes waiting to use the device which may be unavailable
as it is working on another process I/O request. These scheduler queues contribute towards process
scheduling and plays a crucial role in organising how is a process scheduled in an operating system.
For example, a process may be in the ready state, and once the process transfers to the running
state and executed, may issue an I/O request and therefore will be placed in an I/O device queue.
Once the request is fulfilled it will be placed in the ready queue to then be executed in the running
phase.

, -explain operating system scheduler (Types/Objectives)

Schedulers carry out the selection process for when a process transfers to different scheduling
queues throughout the process lifetime. The different types of operation system schedulers include
the CPU scheduler. This is known as the Short term scheduler and this has the object to select which
process is to be executed next and allocated it to the CPU. Therefore, contributes towards



 Long-term scheduler (or job scheduler)
Long-term scheduler strives for good process mix
Selects which processes should be brought into the ready queue
Long-term scheduler is invoked infrequently (seconds, minutes)  (may be slow)
The long-term scheduler controls the degree of multiprogramming
 Processes can be described as either:
I/O-bound process – spends more time doing I/O than computations, many short CPU bursts
CPU-bound process – spends more time doing computations; few very long CPU bursts
Long-term scheduler strives for good process mix



Conc: overall all these things help schedule a process…

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller cslbrunel. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for £16.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

72042 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy revision notes and other study material for 14 years now

Start selling
£16.49
  • (0)
  Add to cart