wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Traditional UNIX Scheduling

profile
Parth Patel
Sep 09, 2024
0 Likes
0 Discussions
196 Reads

Traditional UNIX scheduling, as used in  SVR3  and  4.3 BSD UNIX , is primarily designed for a  time-sharing interactive environment . The goal of the scheduling algorithm is to provide good  response time  for interactive users while ensuring that low-priority background jobs do not starve. Although modern UNIX systems have replaced this algorithm, understanding its structure offers valuable insights into  time-sharing scheduling .


 Multilevel Feedback with Round Robin:-


The traditional UNIX scheduler employs a  multilevel feedback queue  combined with a  round-robin scheduling  approach within each priority queue. This means processes are assigned to different queues based on their priority, and within each queue, processes take turns executing.


One-Second Preemption:-


The system uses  one-second preemption , meaning that if a running process does not block or complete within one second, it is preempted. This ensures that no single process can monopolize the CPU for too long, maintaining fairness across processes.


Priority Calculation:-


Process priority is determined based on the process type and  execution history . The following formulas are used to calculate CPU utilization and process priority:



Priority Recalculation:-


The priority of each process is recomputed  once per second , at which point a new scheduling decision is made. The  base priority  ensures processes remain within fixed priority bands. These bands group processes into different priority levels, such as  Swapper ,  Block I/O device control ,  File manipulation ,  Character I/O device control , and  User processes .


The bands are used to:


-  Optimize access to block devices  (like disk drives).


-  Respond quickly to system calls .



I/O-Bound vs. CPU-Bound Processes:-


Within the  user process band , the scheduler penalizes  processor-bound processes  (those using significant CPU time) and favors  I/O-bound processes  (those waiting for input/output operations). This helps improve system efficiency by ensuring that processes waiting for I/O can proceed quickly, while processes that are consuming large amounts of CPU time are deprioritized.


Scheduling Example:-


An example of process scheduling might involve three processes (A, B, and C), all starting at the same time with a  base priority  of 60. Ignoring the  nice value , the clock interrupts the system 60 times per second, incrementing a counter for the running process. Assuming none of the processes block themselves and no other processes are ready to run, they are scheduled based on their priorities, and preempted as necessary.


 Conclusion:-


The traditional UNIX scheduling algorithm is well-suited to general-purpose time-sharing environments. By using multilevel feedback, round-robin preemption, and execution history, it balances the needs of  interactive users  and  background tasks  while ensuring efficient use of system resources, especially I/O devices.


Comments ()


Sign in

Read Next

Top Career Paths After a B.Com Degree in Mumbai: What’s Next for You?

Blog banner

Ransomware

Blog banner

GIS info about Bermuda Triangle

Blog banner

Rapido

Blog banner

Real time scheduling

Blog banner

10 Unknown facts about India's Independence

Blog banner

Virtual memory

Blog banner

ZOHO

Blog banner

How to Compare Schools Before an Admission Decision

Blog banner

Race Condition in Operating Theatre

Blog banner

RACI model in IT services

Blog banner

Deadlock

Blog banner

Pro-Tips On How To Keep your Foot Healthy

Blog banner

Os Virtual Memory

Blog banner

Bulk E-mail software

Blog banner

Cyber Forensic in the Banking sector

Blog banner

Why do you need a personalised bag tag for your kids' school bags?

Blog banner

AI and cyber Security

Blog banner

Mobile Security

Blog banner

Skills An Ethical Hacker Must Have

Blog banner

CONCURRENCY

Blog banner

Operating Systems

Blog banner

"Audit" In Data Science

Blog banner

Understanding the 4 Types of Learning Methods in Early Childhood

Blog banner

MAJOR ACHIEVEMENTS OF OS

Blog banner

Supervised and unsupervised learning

Blog banner

From Loom to Luxury: How Patola Elevates Modern Wardrobes

Blog banner

Random Forests

Blog banner

Emotional Suppression: The Hidden Costs Of Unfelt Feelings

Blog banner

The Role of Teachers in Building a Child’s Confidence

Blog banner

Brilliant WhatsApp Features Upcoming in 2023

Blog banner

Deadlock in operating system

Blog banner

Memory Management

Blog banner

How to Encrypt and Decrypt Using GNU PGP

Blog banner

Natural Language Processing(NLP)

Blog banner

Self managing devices

Blog banner

Protect yourself from System Hacking with these Simple Steps

Blog banner

'Positivity in life'

Blog banner

Ola

Blog banner

Evolution of the Microprocesor

Blog banner

What is Minting & Mining

Blog banner

What does the Australian summer have in store for your oral health?

Blog banner