Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
29-32(неполный).docx
Скачиваний:
0
Добавлен:
01.05.2025
Размер:
194.24 Кб
Скачать

Экзаменационный билет № 29

  1. Scheduling :Multilevel Feedback Queues (MLFQ)

The Multilevel feedback queue scheduling algorithm is what is used in Linux and Unix systems. The MLFQ algorithm tries to pick jobs to run based on their observed behavior. It does this by analyzing whether a job runs for its full time slice or if it relinquishes the CPU early to do I/O. This allows the scheduler to determine if a job is I/O bound or CPU bound so that they can be treated differently.

Advantage: Adaptive behavior can distinguish between CPU and I/O bound tasks and schedule them

Disadvantage: More complicated. Uses past behavior to predict future.

  1. Paging : a TLB and demand paging. How is one used?

IMPLEMENTATION OF DEMAND PAGING

A copy of the entire program must be stored on disk. (Why?)

Valid bit in page table indicates if page is in memory.

1: in memory 0: not in memory (either on disk or bogus address) . If the page is not in memory, trap to the OS on first the reference

The OS checks that the address is valid. If so, it

1. selects a page to replace (page replacement algorithm)

2. invalidates the old page in the page table

3. starts loading new page into memory from disk

4. context switches to another process while I/O is being done

5. gets interrupt that page is loaded in memory

6. updates the page table entry

7. continues faulting process

In some implementations, the hardware loads the TLB on a TLB miss.

If the TLB hit rate is very high, use software to load the TLB

1. Valid bit in the TLB indicates if page is in memory.

2. on a TLB hit, use the frame number to access memory

3. trap on a TLB miss, the OS then :

a) checks if the page is in memory

b) if page is in memory, OS picks a TLB entry to replace and then fills it in the new entry

c) if page is not in memory, OS picks a TLB entry to replace and fills it in as follows :

  • invalidates TLB entry

  • perform page fault operations as described earlier

  • updates TLB entry

  • restarts faulting process

All of this is still functionally transparent to the user.

3. File Organization: On-Disk Data Structures

The structure used to describe where the file is on the disk and

the attributes of the file is the file descriptor (FileDesc). File

descriptors have to be stored on disks just like files.

• Most systems fit the following profile:

1. Most files are small.

2. Most disk space is taken up by large files.

3. I/O operations target both small and large files.

=> The per-file cost must be low, but large files must also have

good performance.

Экзаменационный билет № 30

  1. Планирование и диспетчеризация процесс Scheduling : Lottery Scheduling

Lottery Scheduling!

• Give every job some number of lottery tickets.

• On each time slice, randomly pick a winning ticket.

• On average, CPU time is proportional to the number of tickets

given to each job.

• Assign tickets by giving the most to short running jobs, and fewer

to long running jobs (approximating SJF). To avoid starvation,

every job gets at least one ticket.

• Degrades gracefully as load changes. Adding or deleting a job

affects all jobs proportionately, independent of the number of

tickets a job has.

2. OS LINUX :History and Structure

History of Linux

Free operating system based on UNIX standards

• UNIX is a proprietary OS developed in the 60’s, still used for mainframes

• First version of Linux was developed in 1991 by Linus Torvalds

• Goal was to provide basic functionality of UNIX in a free system

• Version 0.01 (May 1991): no networking, ran only on 80386-compatible Intel

processors and on PC hardware, had extremely limited device-drive support,

and supported only the Minix file system

• Version 2.6.34 (Summer 2010): most common OS for servers, supports

dozens of file systems, runs on anything from cell phones to super computers

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]