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

2) Memory allocation strategies: Paging

Paging :

1.  divides and assigns processes to fixed sized pages,

2.  then selectively allocates pages to framesin memory, and

3.  manages (moves, removes, reallocates) pages in memory.

90/10 rule: Processes spend 90% of their time accessing 10% of

their space in memory.

=> Keep only those parts of a process in memory that are actually

being used

•  Pages greatly simplify the hole fitting problem

•  The logical memory of the process is contiguous, but pages need

not be allocated contiguously in memory.

•  By dividing memory into fixed size pages, we can eliminate

external fragmentation.

•  Paging does not eliminate internal fragmentation (1/2 page per

process)

Paging: Example!

3) Secondary Storage Management :Things you should be able to do: What property of disks can we use

to make the insertion, deletion, and access to the lists of requests fast? Rank the algorithms according

to their expected seek time. А)Is SCAN or SSTF fairer? Б) Is SCAN or C-SCAN fairer?

SSTF(Shortest seek time first): always go to the next closest request.

- Order of seeks: 40, 18, 65, 78

Distance of seeks: 10 + 22 + 47 + 13 = 92

– Can implement this approach by keeping a doubly linked sorted list of requests.

SCAN : head moves back and forth across the disk (0 to 100, 100 to 0, 0 to 100, ...), servicing requests as it passes them

– Order of seeks, assuming the head is currently moving to lower numbered blocks: 18, 40, 65, 78

Distance of seeks: 12 + 22 + 25 + 13 = 72

– Requires a sorted list of requests.

– Simple optimization does not go all the way to the edge of the disk each time, but just as far as the last request.

C-SCAN: circular scan algorithm (0 to 100, 0 to 100, ...)

Order of seeks: 40, 65, 78, 18

Distance of seeks: 10 + 25 + 13 + 60 = 108

– More uniform wait times for requests. At the end of a pass, most requests are likely to be at the other end.

With SCAN, these requests get serviced at the end of the sweep.

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

1)Processes:os organizations

The structure of operating systems has evolved as new systems have been developed. However, there is no one best OS organization, and different structures have their own benefits and drawbacks. The Kernel is the protected part of the OS that runs in kernel mode. This is typically used to protect the critical OS data structures from being read or modified by user programs. Depending on the OS organization being used, the kernel may be broken up into different components to either simplify OS development or to support different types of security. Thus different operating systems have different boundaries between the kernel and user space, depending on the functionality which is protected by the operating system. Monolithic kernel is a kernel architecture where the entire kernel is run as a single privileged entity running on the machine. Functionality in a monolithic kernel can be broken up into modules, however, the code integration for each module is very tight. Also, since all the modules run in the same address space, a bug in one module can bring down the whole system. In a monolithic kernel, all the systems such as the file system management run in an area called the kernel mode. The main

problem with this organization is maintainability. Examples - Unix-like kernels (Unix, Linux, MS-DOS, Mac OS).

Layered architecture organizes the kernel into a hierarchy of layers. Each layer provides a different type of functionality.

Microkernel is a minimal computer operating system kernel which, in its purest form, provides no operating- system services at all, only the mechanisms needed to implement such services, such as low-level address space management, thread management, and inter-process communication (IPC).

Hybrid kernel is a kernel architecture based on combining aspects of microkernel and monolithic kernel architectures used in computer operating systems. It packs more OS functionality into the kernel than a pure microkernel. Example - Mac OS X is based on the Mach microkernel. Modules are used by many modern operating system to divide a monolithic style kernel into more manageable components. Modules can be loaded dynamically to adjust the features provided by the OS. Modules are similar to layers, but modules can more easily communicate with one another. A modular system allows the OS to reduce its footprint and provide for cleaner development.

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