
- •1) Intro to Operation systems: History of os
- •2) Memory allocation strategies: Contiguous allocation (first-fit and best-fit algorithms)
- •2) Memory allocation strategies: Paging
- •3) Secondary Storage Management :Things you should be able to do: What property of disks can we use
- •1)Processes:os organizations
- •2)Memory allocation strategies: Segmentation
- •3) General Skills : You should be able to read Java code. Given a example
- •1) Processes:Parameter Passing
- •3) General Skills : You will not be asked detailed questions about any specific operating system, such as Unix, Windows, Mac os X ..
2)Memory allocation strategies: Segmentation
Segmentation allows multiple processes to share main memory, but makes it expensive for processes to grow over time.
Segments take the user's view of the program and gives it to the OS.
• User views the program in logical segments, e.g., code, global
variables, stack, heap (dynamic data structures), not a single linear array of bytes.
• The compiler generates references that identify the segment and the offset in the segment, e.g., a code segment with offset = 399
• Thus processes thus use virtual addresses that are segments and segment offsets.
! Segments make it easier for the call stack and heap to grow
dynamically.
! Segments make both sharing and protection easier.
Implementing Segmentation:
• Segment table: each entry contains a base address in memory,
length of segment, and protection information (can this segment
be shared, read, modified, etc.).
• Hardware support: multiple base/limit registers.
Segmentation can be combined with a dynamic or static relocation system,
– Each segment is allocated a contiguous piece of physical memory.
– External fragmentation can be a problem again
3) General Skills : You should be able to read Java code. Given a example
Java is a general-purpose, concurrent, class-based, object oriented computer programming language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to run on another. Java provides the following classes/interfaces:
– Naming:class that provides the calls to communicate with the remote object registry
– public static void bind(String name, Remote obj)- Binds a server to a name.
– public static Remote lookup(String name) - Returns the server object that corresponds to a name.
• UnicastRemoteObject: supports references to non-replicated
remote objects using TCP, exports the interface automatically
when the server object is constructed
• Java provides the following tools:
– rmiregistryserver-side name server
– rmic:given the server interface, generates client and server stubs that create and interpret packets.
Экзаменационный билет № 12
1) Processes:Parameter Passing
Passing parameters to the kernel for a system call must be performed differently than when using an ordinary functional call. This is because a system call is performed by the kernel itself, which typically runs in a completely different address space than the process which made the call. Thus it is not possible to simply place system call parameters onto the process' stack as this will not be readily available to the kernel. There are three main methods to pass the parameters required for a system call:
(1) Pass the parameters in registers (this may prove insufficient when there are more parameters
than registers).
(2) Store the parameters in a block, or table, in memory, and pass the address of block as a parameter in a register. This approach is used by Linux and Solaris.
(3) Push the parameters onto a stack; to be popped of by the OS.
2) Memory allocation strategies: Paged segmentation.
Treat virtual address space as a collection of segments (logical units) of arbitrary sizes. Treat physical memory as a sequence of fixed size page frames. Segments are typically larger than page frames, Map a logical segment onto multiple page frames by paging the segments.
A virtual address becomes a segment number, a page within that segment, and an offset within the page.
The segment number indexes into the segment table which yields the base address of the page table for that segment.
Check the remainder of the address against the limit of the segment.
Use the page number to index the page table.
The entry is the frame.
Add the frame and the offset to get the physical address.
Segmentation & Paging
– only need to allocate as many page table entries as we need (large virtual address spaces are not a problem).
– easy memory allocation, any frame can be used
– sharing at either the page or segment level
– increased internal fragmentation over paging
– two lookups per memory reference