100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4,6 TrustPilot
logo-home
Resumen

Summary Cos3721 Assignment 03 assignment solutions

Puntuación
-
Vendido
7
Páginas
7
Subido en
10-08-2023
Escrito en
2023/2024

100% pass Assignment 03 2023

Institución
Grado









Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
Grado

Información del documento

Subido en
10 de agosto de 2023
Número de páginas
7
Escrito en
2023/2024
Tipo
Resumen

Temas

Vista previa del contenido

Operating Systems and Architecture
COS3721


Assignment 3 [Total marks 50]
Important note:

Please note that the questions are based on the exercises in the prescribed textbook but,

are not the necessary the same. So, if you do the exercises in the textbook, you will not

have the same answers and your work will not be given any mark.



Question 1- (based on 11.12 and 11.15, p.526) [25]

(Ex0 11.12, p.526): Suppose that a disk drive has 4000 cylinders, numbered 0 to 3,999. The

drive is currently serving a request at cylinder 1,150, and the previous request was at cylinder

1,805. The queue of pending requests, in FIFO order, is:

2,069; 1,212; 2,296; 2,800; 544; 1,618; 356; 1,523; 3,965; 3,681

Starting from the current head position, what is the total distance (in cylinders) that the disk arm

moves to satisfy all the pending requests for each of the following disk-scheduling algorithms?

a. FCFS (5)

b. SCAN (5)

c. C-SCAN (5)



~ calculate the distance traveled for each request and then sum up these distances to get the total
distance.



Given:

- Current position: 1,150

- Previous request position: 1,805

- Pending requests: 2,069; 1,212; 2,296; 2,800; 544; 1,618; 356; 1,523; 3,965; 3,681

- Total number of cylinders: 4,000



a. FCFS (First-Come, First-Served):

, In FCFS, the requests are served in the order they were received.



Total distance = Sum of absolute differences between consecutive request positions



1,150 -> 2,069 = 919

2,069 -> 1,212 = 857

1,212 -> 2,296 = 1,084

2,296 -> 2,800 = 504

2,800 -> 544 = 2,256

544 -> 1,618 = 1,074

1,618 -> 356 = 1,262

356 -> 1,523 = 1,167

1,523 -> 3,965 = 2,442

3,965 -> 3,681 = 284



Total distance = 919 + 857 + 1,084 + 504 + 2,256 + 1,074 + 1,262 + 1,167 + 2,442 + 284 = 12,909



b. SCAN (Elevator):

In SCAN, the arm moves in one direction (either towards the end or towards the beginning) until it
reaches the end of the disk, and then it reverses direction.



Total distance = Sum of distances within the current direction + Distance to the end + Distance to the
last request



1,150 -> 3,999 = 2,849 (towards the end)

3,999 -> 3,681 = 318 (reversing direction)

3,681 -> 356 = 3,325 (reversing direction)

356 -> 544 = 188 (reversing direction)

544 -> 1,212 = 668 (reversing direction)



Total distance = 2,849 + 318 + 3,325 + 188 + 668 = 7,348
$5.46
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
elenaprowriter University of South Africa (Unisa)
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
101
Miembro desde
4 año
Número de seguidores
70
Documentos
20
Última venta
2 meses hace

3.5

13 reseñas

5
3
4
4
3
4
2
1
1
1

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes