ikt-102_operativsystemer_20231214230226 Flashcards
What is an operating system?
An operating system is a software that runs in the kernel, and defines a set of standard interface rules, provides services, and acts as a common platform for applications and devices to interface with. It is the interface between machine hardware and user applications, it is a collection of system programs that control system activities, and it defines the rules for these interactions. It allocates available resources and can give user limited access to those various resources.| Interface rules, services, machine hardware, user applications, system a
- Q: What two ways are resources allocated in operating systems, what is this called?
Resources are allocated in two ways, either in time (the CPU), or in relation to space (RAM/Disks). This is called multiplexing.| Time, Space
- Q: (OPERATING SYSTEM) What are the main functions of an operating system?
- Common Platform- Interface: Hardware <-> User Applications- Coordinate all activity- I/O- Memoryignorer når du pugger:The operating system is supposed to be a common platform between hardware devices, software, and various compatible user applications. As a common platform, the only thing you have to worry about as a consumer or programmer is if the software or hardware is compatible with an operating system.Firstly, it is to administrate and coordinate all activities, and to resolve conflicts wherever they arise. Furthermore, to keep track of files, and to handle all I/O activities, as well as managing memory. Secondly, it is to establish a common platform for user applications to run in, a simple interface between hardware and user applications.| Common platform, coordinate all activities
- Q: (OPERATING SYSTEM) What is an extended machine?
- A way of viewing operating systems function* Abstraction* Interface between Machine Hardware & User ApplicationsExtended machine is a way of viewing operating systems. As an extended machine operating systems are supposed to create an abstraction of the underlying hardware for system resources and users to interface with. This is because the underlying hardware can be extremely complex, and it serves everyone’s best interest if the operating system handles hardware.| Extended machine, abstraction, interface
- Q: What is an example of an abstraction the operating system makes?
An obvious example of an abstraction is the file system. Hard drives are extremely complicated, and to make them usable by people and programmer’s abstractions are necessary.| File system
- Q: (OPERATING SYSTEM) What is a resource manager?
Resource manager is a way of viewing the operating system. As a resource manager the system is tasked with allocating system resources where they are needed. In order to do this the OS has to keep track of what resources are used and by what processes they are being used at all times, furthermore, to decide who should get the resources next, and to resolve conflicts between processes.| Resources, tracking resource usage, resolving conflicts, scheduling
- Q: (OPERATING SYSTEM) What is multiplexing?
Multiplexing means sharing of resources, this can be done in time and space. In time multiplexing we mean that resources are shared based on time used, such as the CPU. In space multiplexing we mean resources that are shared are shared between many programs, e.g., RAM or storage| Sharing resources, time, space
- Q: What is a System Call?
As an extended machine, the operating system hides the complex underlying operations through services, and in order for programs to access such services they have to initiate a system call, notifying the operating system of their request.explanation:To understand what System call is, we need to understand that the computer runs in two modes, User mode and Kernel mode. Behind kernel mode are many services and routines that are restricted from user mode processes to use. Thus, if a user mode process needs to use a service or routine in kernel space, it must make a system call to let the operating system know this.Then, the operating system will trap this process, and take control of it. Now in kernel mode, The OS will read the parameters and then proceed to do the job. When the job is complete, the OS hands back control to the process and it returns to user mode.| service, access to services, request
- Q: Give some examples of system calls.
There are many kinds of system calls, in POSIX-compliant systems some of them are:- open (initializing access to file)- read (access data in a file stored in the file system)- write (writes data from buffer to a device, e.g., a file)- exit (a process terminates itself after completing work)- kill (a command that sends a signal to a process, requesting it to exit)| open, read, write, exit, kill
- Q: Why are system calls necessary?
System calls are necessary because some of the available services operating systems provide must run in kernel mode. Thus, if a user application wishes to make use of a system call like that, it must make a system call, and from there the operating system will run the part of the program that needs to be in kernel mode, when the job is complete the OS hands back control to the user application.Explanation:System calls are necessary because the OS runs in two modes, user and kernel mode. So, the question is really why are there these two modes? It is to act a safeguard against processes performing harmful operations they should not be doing, such as accidentaly reading or writing to files they have no bussiness interacting with.| services, kernel mode
- Q: What is POSIX?
Portable Operating System IX, POSIX, is a standard for UNIX systems that was developed by the IEEE Standards Board. It is notable for its success in establishing an industry standard, where many attempts before it had failed. The goal of POSIX was to make it easier for programmers to write UNIX programs that are compatible with any UNIX system. Before POSIX, there were many variants of UNIX, which was a challenge for programmers who had to adapt their code to each one if they wanted part of that market share. As this was seen as unsustainable, a standardization was necessary. POSIX version 1003.1 standardizes system calls. Later, a version** 1003.1c came which standardizes threads**.| Easier to write programs for UNIX systems, before many variants
- Q: What is multiprogramming?
Multiprogramming is essentially when more than one program is held in memory concurrently, ready to run whenever they are allocated CPU time again. This feature makes better use of the CPU, since instead of waiting for a program to complete some I/O operation, it can immediately go to work on another program.| concurrent running programs, makes better use of CPU
- Q: What makes multiprogramming possible?
Multiprogramming works due to the great speed difference between the CPU operations as compared to the I/O operations. Typically, CPU operations are 1000 times faster than I/O operations.| Speed difference, 1000 times faster operations
- Q: Explain user mode and kernel mode
A computer runs in two modes, user mode and kernel mode. The operating system runs in kernel mode, where it has full access to all instructions the hardware is capable of running. User mode programs and applications have limited access to such instructions and have no access whatsoever to instructions that can control the machine itself or I/O devices.| user mode, kernel mode
- Q: What happens during a system call?
- An application needs access to a service. However, this service is restricted to kernel mode2. The application makes a system call, which the operating system receives3. The OS takes control of the program, and reads the instruction and parameters4. The OS locates the relevant service routine and completes the job5. The OS returns control back to the program
- Q: Talk about kernel mode
Kernel mode is fully controlled by the operating system. Kernel mode acts as a safeguard against applications making illegal operations, such as overwriting files.
What items do processes have?
Processes will each have an address space with its own program text and data, as well as its own logical program counter, registers, variables, and other resources, such as: open files, child processes.
What is a process?
The process is an instance of a running program and is a clever way of grouping related resources together.| Running program, address space, group resources, program counter
What benefits are there to processes?
- Processes are the foundation of modern computing- Enable multiprogramming - Increases efficiency and speed of programs- Schedulers make it possible to manage a lot of activity within a computer system| manage activity in computer, scheduler
Are programs and processes the same thing?
No, despite being similar, processes and programs are quite different. The program is essentially the recipe, and the processes is the activity of creating whatever the recipe describes. In essence, the process is a running instance of a program, and a program is a passive recipe for the process to follow.| program = recipe, process = activity
How are processes created?
Processes are created by:system initialization, other processes, and a user request. In every case a system call is executed, calling on the operating system to create a process and run it in the indicated program.| system initialization, other processes, user request, system call
Why are processes terminated?
Processes will eventually end, and this can happen for a number of reasons. - Completed work.- Killed by another process- Error exit (encounters bug)- Fatal Error (causes the bug)The most obvious would be that a process has completed its work. At that point the compiler would then execute a system call, letting the operating system known to terminate the processSome processes can be killed by other processes. Other reasons are error exit, and fatal error. Error exit happens when a process encounters an error, announces just that, and exits. Fatal errors happen when the process itself causes the error, due to a bug in the program.
How are processes terminated?
Processes are usually terminated by the operating system. A system call is made, requesting that the operating system terminates a process, for whatever reason.| complete work, other processes, error exit, fatal error
What enables multiprogramming with processes?| States
Processes are essential for multiprogramming environments with parallel processing. To make this possible, processes have states which may be saved.
Talk about the states a process can be in.
There are three possible states for a process to be in: - Running- Ready- Blocked. It is common for processes to be interrupted many times during their lives, but from the process’ point of view, it would be as if they never stopped.When a process is running, it is using the CPU. When a process becomes blocked, that means it is waiting for an external event to occur. This is known as an interrupt and are common for many processes. When a processes are ready, they are waiting for their turn to use the CPU. For example, a process that was interrupted by an I/O will become blocked, when the input is available it will then enter the ready state and wait for its turn to use the CPU.| running, ready, blocked, interrupt, ready state, never stopped at all
Where are process states saved?
- Process table (alt. Process Control Table = PCB)- One entry per processIn order for states to be saved, the system has an array of structures called the process table, with one entry per process. With these parameters, it is possible for a process to change between the three aforementioned states.| Process table, one entry per process
What items of the host process can the thread make use of?
Threads may avail themselves of their host process’ items, such as: - Address space, - memory, - global variables, - open files,- child processes, - pending alarms, - signals and signal handlers, - and accounting information.
What is a thread?
- A way of viewing a process is that of a thread of execution, usually shortened to thread. - Each process has an address space, and if multithreading is possible, there can be two or more threads of control within one process.| thread of execution, address space, memory, open files
What is stored on the thread’s stack?
In each thread’s stack there is a frame for each procedure that has been called but not returned, and the frame’s local variables and return address are there as well for when the procedure has finished.In the stack are frames, with local variables, that haven’t been returned, and return address.
What items do threads have?
Threads themselves have items of their own, such as: - Program counter- Registers- Stack- State.| Program counter, registers, stack, state
Microsoft WordThreads share address space and memory with their host process, what are the potential benefits of this interaction?
We mentioned earlier that threads share address space, open files and memory with the process of which they are part. This is important for some applications where you cannot share all resources among multiple processes. An example of such an application is Microsoft Word, whereone thread can interact with the user, another can reformat the document as changes are being made, and a third can occasionally write to RAM. This is only possible because the threads all share memory, otherwise they could not have access to the same document being edited.| address space, open files, memory, microsoft word (user, reformat, RAM)
What are the benefits of using threads in high I/O environments?
Threads are reminiscent of processes, where multiprogramming is the rapid switching between processes. Multithreading is the same thing, except now we have threads who share memory. Creating threads also happens very fast, about 10-100 times faster than processes, resulting in less overhead from creating them.Furthermore, in systems with high computing requirements and significant I/O interrupts, threads will yield better CPU performance.| switch between process (equivalent) multithreading (threads share memory
What alternative to clock interrupt do threads have?| Not to be confused with the run-time system procedure
One important difference between processes and threads is the absence of a clock interrupt within processes themselves to force threads to share CPU time. Without such a call to enforce resource sharing among threads, a thread call thread_yield is used to make threads share the CPU, giving other threads a chance to make progress on their work.| absence of clock interrupt, thread_yield
What do registers hold?| UNIX systems
[memory] instruction word -> [register] -> instruction word [memory]Registers typically hold instruction words from memory, or words to send to memory, such as - variables and - temporary results, as in temporary variables.
What does the program counter do?
The program counter is used tofetch instructions, and it points to the memory address of where the instructions are.
What does the stack pointer do?
The stack pointer points to the stack in memory that is currently being used, and holds local variables, temporary variables, and input parameters that are not held in registers.
What is the UNIX process memory divided into?| hint: 3 things
UNIX processes have their memory divided into text-, (program code)data-, (variables)and the stack. (grows as needed)| text, data, stack
What does file management entail?| UNIX systems
File management is about organizing thelocation of files or processes.
What does the root directory manage? What does the working directory manage?| UNIX systems
Root directory deals with the location of files, and working directory deals with the location of processes conducting work.
What does the File descriptor manage?
File descriptor deals withaccess permission to read/write to files.
What problems might arise from implementing threads in user space?
One problem that could occur with user-level threads is related to page faults. If page fault -> process is blocked while system looks for missing instruction,regardless if other threads are runnable| page fault, blocked, missing instruction
How do user-level threads deal with an imminent blocked state?
thread about to block -> run-time system procedure -> switch to another threadswitch to another thread =kind of like= multiprogrammingrun-time system procedure allows for rapid change between threads| run-time system procedure
What problems might arise from implementing threads in kernel space? Can they deal well with being blocked?
kernel thread =/= run-time system procedurekernel thread switch, must make system callrun-time system procedure = fast and cheapsystem call = costlyOne problem with kernel-level threads is that they do not have this run-time system procedure, meaning kernel threads must make system calls when a kernel thread is about to be blocked. This comes at a much greater cost than user-level thread switching.| run-time system procedure, system call, blocked, greater cost
What is context switching? What enables this switch?
Processes and threads have states, or contexts, which are recorded in the process control blocks (PCB). The PCB can also be called the process-table, and is the key to multiprocessing.| process control block (PCB), process table
How do computers change between processes?
Information about the process is stored at all time in the PCB, or procecss table, and it all is managed by the OPERATING SYSTEM.It records:- program counter- registers- schedules next processChanging from running state to either ready or blocked state is possible because of the information in the PCB.From the process POV, it would be as if it had never stopped running, from start to completion.| state change, PCB, schedule
What information is in the PCB category:process identification?| Process table
The operating system assigns processes unique identifiers, usually indices, in order to *keep track of them and what they are doing in cooperating with other processes. *
What information is in the PCB category: Processor state information| Process table
While the process is running, information about it is kept in registers, and in the case of interrupts this information is saved.
What information is in the PCB category:Process control information| Process table
- page table- state- scheduling- program counter
What three major categories of information are stored on the PCB?| Process table
This information is recorded in the PCB, and may be broadly grouped into three categories:- Process identification- Processor state information- Process control information
What is the condition for initiating a process switch? What handles the switch?
The condition for initiating a process switch is usually an interrupt. Normal interrupts include clock-, interruptsI/O- interrupts andmemory fault interrupts. Whenever these occur, an interrupt handler receives control of the process for some work to be done, depending on the nature of the interrupt before it gives back control to the operating system.| interrupt, clock, I/O, memory fault
What possible changes between the three process states are there?
There are four possible changes between the three process states, and they are:running -> ready (stopped by scheduler)running -> blocked (stopped by interrupt)ready -> running (scheduler picked this process to run)blocked -> ready (I/O work is complete)| running, ready, blocked
What is the difference between a compute bound process and an I/O bound process?
compute bound = few I/O requestsI/O bound = many I/O requests, short bursts of computingcomputer systems alternate a lot between actively computing and waiting for I/O requests to finish| cpu bound, I/O bound
Give an example of how to optimize I/O bound systems in relation to scheduling.
In order to improve performance of the system, you can design the operating system with I/O bound processes in mind. A feature that could be of benefit, would be to focus on allowing I/O bound processes to run as soon as possible,thus beginning I/O work quickly and keeping I/O busy instead of idle.
What is Round-Robin scheduling?| What type of scheduling category does it belong to?
The round robin scheduling algorithm is based on the round-robin principle, where everyone gets a fair and equal share of something.This is categorized as a pre-emptive scheduling algorithm. It is an old and simple scheduling algorithm, and is used mostly formultitasking.In computing we share time slices of the CPU’s time, giving processes a tiny and equal piece. Processes are preempted and are moved to the back of the queue when they have spent their alloted time.| equal share of something, preemptive scheduling
What is Priority Scheduling?| What type of scheduling category does it belong to?
Priority scheduling is a non-preemptive algorithm and one of the most common scheduling algorithms in batch systems. Each process is assigned first arrival time, and if two processes have the same arrival time, OS compares priority -> highest priority winsif priority is the same, process number is compared,lowest number wins| batch systems, first arrival time > priority > lowest number
What is:Shared memory and,Message passing?| Inter process communication
Inter process communication (IPC) happens through:Shared Memory (some shared variable)Message Passing (direct or indirect link)Using these techinques processes can communicate and,synchronize their actions
What is an independent process?| Inter process communication
Independent processes are not affected by the execution of other processes, whereas a co-operating process certainly can be affected by other executing processes.
What is are the benefits of co-operating processes?| Inter process communication
A co-operating process is dependent upon other processes. In many situations, co-operating processes canincrease modularity,computational speed, convencience andmodularity
What two types of processes are there?| Inter Process communication
A process can largely be defined as two types:- Independent process- Co-operating process| independent, co-operating, shared memory, message passing, IPC
What is the Page Table?
The page table is a data structure used by the virtual memory system to store the mapping between logical addresses and physical addresses. These addresses are managed by the MMU.| page table, data structure, mapping, MMU
What maps virtual addresses onto physical addresses?
In order to make use of virtual addresses we need a memory manager to map the virtual address generated by the program onto physical memory.## Footnotec
What is the difference between a Virtual address and a Physical address in memory management?
A physical address is as the name suggests a physical location in memory, and virtual addresses are generated by programs and make up the virtual address space.## Footnotec
Talk about the advantages of using virtual addresses in memory management.
Since virtual address space»_space; physical memory:- can run programs much larger than available memory- can run multiple programs simultaneously## Footnotec
Name an alternative solution to virtual addresses with the aim of running multiple programs in a computer system.
It is still possible to run multiple programs on systems without a virtual address space if you make use of swapping. Swapping entails swapping out the entire program from memory, in order to bring in the new one so that can be run instead.## Footnotec
What is a page replacement algorithm?
Page replacement algorithms are used to determine what page to evict from memory when a page fault occurs. Algorithms are useful in this regard since they hopefully will improve system performance by using a set of criteria to evict pages, rather than just selecting at random.## Footnotec
Explain the clock algorithm.
The clock algorithm will assign what is known as an R bit, which is either 1 or 0, to pages when they are referenced. Whenever a page fault occurs, the algorithm looks at the page it is currently pointing to, if the bit is 1 it is cleared to 0 and the pointer moves to the next page, this repeats until it encounters a page that is initially 0, at which point it is evicted from memory.## Footnotec
Explain how the memory hierarchy works.
The memory hierarchy refers to an aspect of different types of memory related to- size, - speed, and - cost basically,smaller = faster, expensivelarger = slower, cheaperregisters > cache > main memory (RAM) > magnetic disk > magnetic tape## Footnotec
What are the main objectives of the memory manager in operating systems?
MMU handles:- efficient allocation of memory to processes- keeping track of what locations in memory are available- mapping virtual addresses to physical addresses, this is known as paging- swapping## Footnotec
There are two problems with multiprogramming. What is the solution to relocation?
relocation solutionmapping each process’ virtual address space to physical memorygenerate addresses automatically with base and limit registers before sending to memory (SEGMENTATION)A disadvantage of segmentation is that a comparison must be made for ever reference made.## Footnotec
There are two problems with multiprogramming. What is the solution to protection?
protection solutionis solved by the concept of an address space. This way, every process has its own address space where it can address memory.## Footnotec
Explain segmentation (Base and Limit registers).| memory management technique, Address and size
Segmentation is a memory management technique in which the memory is divided into the variable size parts, the details of which are stored in the segment table. The segment table contains mainly two items of information about the segment:SEGMENT TABLE INFO:1. Base: The base address of the segment.2. Limit: The length of the segment.## Footnotec
What are some advantages of segmentation (Base and limit registers)?
- No internal fragmentation- Average Segment Size is larger than the actual page size.- Less overhead- It is easier to relocate segments than entire address space.- The segment table is of lesser size as compared to the page table in paging.## Footnotec
What are some disadvantages of segmentation (Base and limit registers)?
- It can have external fragmentation.- it is difficult to allocate contiguous memory to variable sized partition.- Costly memory management algorithms.## Footnotec
What is paging and what does it have to do with the MMU?
The MMU manages virtual memory, and the the virtual address space consists of units called pages, and correspondingly the unit in physical memory is called page frames. virtual address space = pagesphysical = page frameThis is in essence what paging is, it is what the MMU does when it maps a page from the virtual address space onto a page frame of the physical memory.PAGING IS:virtual -> physical = pages -> page frame## Footnotec
What are two ways to track memory usage?
Free lists and bitmaps## Footnotec
Explain how bitmaps is used to keep track of memory.
Bitmaps can use to track memory usage.Bitmaps divide memory into allocation unitseach AU is assigned a bit, 1 or 01 = occupied0 = freebitmaps allow us to find holes in memory a process can occupy## Footnotec
Explain the not frequently used algorithm
NFU uses a counter to count how often a page has been used. The count is tracked by the R bit, which is 0 for no reference made, and 1 for a reference made. 0 = no reference made1 = reference madeThese bits are added to the counter. When more space is needed, the page with the lowest count is evicted.## Footnotec
Explain the page replacement algorithm aging. How does it work?| Explain what failing NFU has that aging improves
page fault -> page replacement algorithm -> evict some page- aging algorithm is based in software, - and is a variation on NFU (not freq. used)- NFU never forgets counts, regardless how they are gained- some process from the boot sequence might linger in memory- aging algorithm limits how far back you count references by the R bit- NFU = count references made- Aging = count sequence of bits, maximum 8 (or other number)In aging, on every clock tick:-> add R bit to leftmost place of sequence,-> historical R bits are shifted to the right-> evict lowest count## Footnotec
What is the drawback of paging?
The drawback of paging is the need to make at least two memory references to the page, effectively halving performance, since without paging you would only need to make one reference.## Footnotec
How can paging performance be optimized?
Since paging effectively halves performance, you can use a hardware component: Translation Lookaside Buffer (TLB), implemented in the MMU, to carry the most used pages, improving performance substantially.## Footnotec
What is software TLB?| Translation Lookaside Buffer
In the software solution of TLB the OS finds the missing page itself,(-)not as fast as the hardware solution,(+)software solution frees up space on the CPU chip## Footnotec
How can you protect against race conditions?| Safeguard
Access to printer/file only for one process at a timeto protect against two processes writing to the sameresource simultaneouslyif this safeguard fails, race conditions can happen## Footnotec
Give a brief explanation of what deadlock is.
Deadlocks may occur then when two or more resources wish to use the same resources, which end up not being available. In this manner both processes wait for the other to release the resource, which will not happen.## Footnotec
What are the conditions for a deadlock?
For a deadlock to occur you need two or more processes who want to access the same resources, but each process being programmed to do so in different ways. We can imagine two processes, A and B, who want to use the resources x and y, but they ask for permission in an order such that the following happens:- Process A requests permission to use resource x and is granted it.- Process B requests permission to use resource y and is granted it.The problem that arises then is apparent when process A asks to use resource y, and process B asks to use resource x. Since both processes cannot do anything but wait until the resource is available, the outcome is a deadlock that cannot resolve itself.## Footnotec
What is a race condition?
A race condition can occur in certain circumstances where two or more processes are writing to the same shared data, such as an address in a spooler directory, in the case where they are sending input to a printer.## Footnotec
Why is it possible that some process gets mixed in a race condition (interrupts, context switch)?
This can happen if an ill-timed interrupt occurs, resulting in a process B thinking it is writing to an available slot, instead it is overwriting the input of another process A. This sequence of events continues, such that process B is shadowing process A, overwriting every input. Thereby, process B ensures that that unfortunate process A never receives any output.| writing to shared data, interrupt -> Process B overwrite pr. A## Footnotec
Does it matter if we have race condition or deadlock bugs in our OS?
Race condition and deadlock are serious bugs that can cause unpredictable behavior in a computer system. Race conditions are especially nasty since it can be very confusing for users what the underlying problem is.## Footnotec
Why are race conditions and deadlocks so hard to debug?
Since race conditions a dependent upon such strict conditions for them to occur, they are not guaranteed to happen. Thus, during test runs it is unlikely for someone to replicate a race condition. Similarly, deadlocks are dependent upon a specific sequence of events, and thus can also be very tricky to debug.| strict conditions, hard to replicate## Footnotec
How does a semaphore work?
There two operations for the semaphore, up and down. For every iteration of a loop the semaphore checks the count of wakeups, if it is greater than zero it will reduce them by one.If there are processes on the semaphore that still haven’t completed a down operation, they will be selected at random until all processes on the semaphore are down.## Footnotec
What is a semaphore?
A semaphore is an integer variable that represents available wakeups, it can be zero or higher, its aim is to achieve mutual exclusion between processes who wish to enter critical regions of shared resources.## Footnotec
What is a binary semaphore?| what it protects … what it does when entering and leaving
There is another kind of semaphore called the binary semaphore. This is useful for ensuring that processes cannot enter into a critical region if another is already there. The critical region being a shared resource processes can write to.critical region = shared resourceProcesses in this case will do a 1 down operation when entering this space, 2 and an up operation when leaving. Thus, ensuring mutual exclusion.| protect critical region, shared resource, enter = down, leave = up## Footnotec
What is a mutex?| and how do processes enter and leave crit region
A mutex is similar, but simpler, than a binary semaphore,it holds and integer value representing locked or unlocked, the mutex is a shared variable between processes,that is intended to protect some shared resource,mutex is useful in user level thread packagesWhen a mutex is unlocked, a process can call mutex_lock and enter the region protected by the mutex. Processes calling while a mutex is locked must wait until the process calls mutex_unlock and vacates the space. If multiple processes are calling mutex_lock, one is chosen at random and may enter the space| protects shared resource, locked, unlocked, calls until it can enter## Footnotec
What methods of mutual exclusion protecting shared resources are there?
- Semaphore- Binary semaphore- Mutex- Busy waiting## Footnotec
What implementations of busy waiting are there?
There are various implementations of busy waiting, such as: - Peterson’s solution and the - TSL instruction.## Footnotec
What are the four basic criteria for mutual exclusion?| Are there solutions that pass every criteria?
The four basic criteria for successful solution to mutual exclusion challenge- No two processes may be simultaneously inside their critical regions.- No assumptions may be made about speeds or the number of CPU’s.- No process running outside its critical region may block any process. - No process should have to wait forever to enter its critical region.## Footnotec
Name the solutions and if they fail or pass the four basic criteria for successful mutual exclusion in critical regions.
- Disabling interrupts might conflict with the 4th condition, also it is not feasible to disable interrupts in a multiprocessor environment, since there is nothing stopping the other cores from causing interference. cannot work in multiprocessor environments!2. Lock variables (MUTEX) have the same underlying problem we discussed with race conditions, thus failing on the 1st condition. Mutex fail 1st condition (no two processes inside crit region simultaneously)3. Peterson’s and the TSL solutions are valid and fulfil all the conditions.## Footnotec
What is busy waiting, and why is this not wanted in operating systems?
Busy waiting is another method of achieving mutual exclusion in critical regions in shared memory. However, busy waiting, is in essence the wasting of CPU time, and is in and of itself inherently undesirable. Therefore, busy waiting is not desired in operating systems.| busy waiting, conditions for successful solution, 4 points## Footnotec
What is DMA (Direct Memory Access)?| memory buffer
1 Direct Memory Access, DMA, is a hardware component that aids the CPU in managing I/O requests, holding I/O requests in registers accessible by the CPU. 2 Most DMA controllers make use of physical memory addresses, and for that to be possible the operating system has to convert the virtual address of the intended memory buffer into a physical address, and then write this physical address to the DMA’s registers.| hardware component, I/O requests, registers## Footnotec
How does DMA work?
To explain how the DMA works, consider the case of transferring data to memory from a disk. 1. Initially, the DMA receives instructions from the CPU to transfer data to memory, 2. the DMA then makes a request of the disk and transfers the data to memory. 3. When the task is complete, the DMA interrupts the CPU to make it known.| transfer data from memory -> disk, CPU instructions, interrupt## Footnotec
What are the strengths/weaknesses of DMA?| depends on use case
(+) The obvious benefit of the DMA is that it saves the CPU valuable time by handling time consuming I/O requests. However, this argument is relative and dependent on the use case. If you have a system where the I/O is fast, it makes little sense for a slow DMA controller to handle transfer requests rather than having the fast CPU do it instead. THUS,(-) IF I/O is fast -> let fast CPU handle I/O requestsYou do not want your CPU to wait on the DMA controller.(-)Furthermore, not having a DMA at all saves money, which is a benefit in and of itself.| Save CPU time for I/O bound systems, no DMA = save money## Footnotec
Explain how interrupts work.| I/O work done
1. signal goes to -> interrupt controllerInterrupts are signals that go to the interrupt controller, they tell the controller that the work assigned to the I/O device by the CPU is now complete. 2. interrupt controller decides next action -> CPU interruptedFrom there, the interrupt controller determines what happens next. Depending on whether there are other interrupt requests from pending, it might have to wait and continue to assert its interrupt signal until it is serviced by the CPU. i.e., I/O must wait until it is serviced by the CPU3. CPU interrupted -> process is blocked1 When the CPU gets interrupted it stops its current task to address the request. Thereby, blocking the process it was working on. 2 The interrupt vector fetches a new program counter, which points to the start of the corresponding interrupt service procedure.## Footnotec
What methods of handling interrupt requests are there?
- Interrupts- busy waiting- DMA## Footnotec
What are the strengths/weaknesses of interrupts?
ADVANTAGES* Interrupts enable I/O to work while CPU can do something else* Save costs on DMA by using interrupts* Lets higher priority tasks block less important processesDISADVANTAGES- Can happen at inconvenient times- CPU can disable interrupts if it wants to## Footnotec
What are some ways to aid with device independence?| Two ways
The operating system is responsible for maintaining this abstraction for programs to interface with, and to handle all the complexities of the underlying hardware. There are ways to aid in this, a couple of examples are:- Uniform naming. Names of files or devices are independent of the device itself, in favor of addressing them by a path name.PATH NAME - Error handling. Whereby, errors that occur are handled at lower layers, and often resolved there, without the operating system being aware of it.OS NOT AWARE OF ERRORS HANDELED## Footnotec
What are the principals of a device independent operating system?
Device independence means it should not matter what type of device is being read from or written to in programs, regardless of how different they actually are behind the abstraction.## Footnotec
How is the file system implemented in a hard drive?| low and high-level format, MBR, partition, BIOS, bootstrap
- HDD must undergo low-level format, they are empty from factory2. format consists of three fields, preamble, data and ECC (Sizes may vary dependant on device)3. Disk partition1 each partition is logical disk2 sector 0 holds Master Boot Record (MBR) 3 MBR holds partition table and boot code4 partition example: C: drive4. High-level format of each partition that establishes:1 root directory2 empty file system5. after high-level format system is boot ready6. BIOS reads MBR, checking boot sector to runIf successful -> launch bootstrap program to find OS kernel -> load into memory -> execute| Error Correcting Code## Footnotec
The UNIX file system propagates from the root directory, what role do i-nodes play in this
To understand what this means, firstly understand that the file system in UNIX grows like a tree, starting from the root directory. In order to locate a file in a given directory we use path names. directories use path names, the file system looks for the relevant i-node associated with the file path name opened within the root directory,when it has the i-node, the file system looks for the i-number to the next i-node*and so it goes *i-node (in root) -> i-number -> i-node -> i-number et cetera.thusly the file system propagates through i-nodes until it has reached the file## Footnotec
What is an i-node, what does it contain?| UNIX systems
opening a file retrieves an i-number (index)i-number -> table of i-nodes (index nodes)i-nodes contain information such as:- file size,- creation- last access- last modification- owner, group- protection information## Footnotec
Checklist preparation for exam question related to Øving 1What should be included when asked:What is an OS,and what are its main functions.
General explanation what OS is:- Common platform- Software that acts as an Interface between hardware and softwareTwo main roles of an OS:Extended MachineResource Manager- Process- Memory- I/O- Files
Checklist preparation for exam question related to Øving 1What should be included when asked:Extended Machine
- Hardware is complex- Programmers don’t want to worry about hardware- OS hides complexity behind abstractions- OS acts as a common platform
Checklist preparation for exam question related to Øving 1What should be included when asked:Resource Manager/Administrator
OS manages:- Open files - I/O- Memory- ProcessesMultiplexingOS shares resources in two ways:- Time (CPU)- Space (Memory)OS Responsibility:- Control all activity in the system, I/O devices, programs, storage
Checklist preparation for exam question.Why may it be useful to learn about “outdated” operating system concepts?
:: Old solutions might suit new technology betterIt may be useful to know older solutions when innovating new technology that might be better if implemented with an old “outdated” solution than with a new one.:: New solutions solve old problemsNewer solutions naturally attempt to solve some problem with older systems. Those problems might not be relevant at all for what you are trying to achieve. By knowing more one may be better able to discern what concepts to include or exclude from a technology.:: Multiprogramming and hardware protectionAn example:Multiprogramming is a given in modern computer systems, but not all technologies can make use of running multiple programs simultaneously. If you have multiprogramming available to you, you probably have costly protection hardware as well. Perhaps your new technology doesn’t need to run multiple programs, so it wont need protection from different processes interfering with each other.
Checklist preparation for exam question.Explain the six possible changes between states of a process
- Running -> BlockedThe process in this case was running, then either due to a memory fault, or an I/O request, it was blocked.2. Running -> ReadyIn this case, the process is likely subject to a clock interrupt and made to go back to queue and wait for its turn on the CPU.3. Ready -> RunningIn this case, the CPU was chosen by the scheduler to use the CPU4. Blocked -> ReadyIn this case, the process was initially blocked by an I/O request. When the I/O request has been completed the process changes to Ready state.5. -> ReadyA process has been initiated and it enters an initial state of Ready, waiting in queue for its turn on the CPU.6. Running -> ExitThe process has completed its work, it Exits and is terminated by the operating system.
Checklist preparation for exam question related to Øving 2What should be included when asked about PROCESS AND THREADS:What is a process and thread
:: Generell forklaring på process og tråd- A process is an instance of a running program, where the program is simply the recipe.- A thread can be seen as a program counter within a program counter- A process can be seen as a thread of execution
Checklist preparation for exam question related to Øving 2What should be included when asked about PROCESS AND THREADS:What resources are grouped together in processes and threads?
:: Ressursgruppering for prosesser og tråder- Processes have an address space, text, data, stack- Threads share all memory with their host process as well as address space, and they have their own stack and program counter
Checklist preparation for exam question related to Øving 2What should be included when asked about PROCESS AND THREADS:Talk about PCB, states, text, data, stack and registers.
- Process Control Block (PCB) tracks all information about processes and records their state when a context switch happens- Processes and threads have three states, running, blocked, ready.- Text holds the program source code- Data holds variables and grows in memory- Stack grows in memory as the program runs- Registers hold words to memory and words from memory that have not yet been returned, as well as their address to return to
Checklist preparation for exam question related to Øving 2What should be included when asked about PROCESS AND THREADS:Why is the process and thread the most important concepts in operating systems?
The process and thread is the keystone of modern computing. It enables:- Multiprogramming- Multiprocessing - MultithreadingLeading to vast improvement to system performance. As the limit of how many atoms can fit together on a computer chip is getting closer, optimizing programs to make use of multiprocessor and multithread environments helps push computing power and efficiency forward.- System performance - Limit on how many transistors on CPU gjetting nearer
Checklist preparation for exam question.What should be included if asked:What minimum functionality is needed in a microkernel
You may want as small a kernel as possible to minimize numbers of bugs within kernel space where access to hardware is. Bugs here may cause more harm than bugs in user space.The most basic functions to include in an such a microkernel are:- Process management, Scheduler- Interprocess communication (IPC)- Calls to functions, like interrupt handlersAnd ones to exclude are:- Memory management- I/O, you don’t want buggy audio driver to crash your system
Checklist preparation for exam question.What should be included if asked:Explain what paging is and how it works in the computer system.Also, why is paging still a useful technique even if the system has enough physical RAM to get the job done anyway?
- Paging is simply put: the act of mapping virtual addresses (virtual pages) onto physical addresses (page frames)- Paging is done by the MMU- The virtual address space may contain many more addresses than available physical memory addresses.
Checklist preparation for exam question.What should be included if asked:Also, why is paging still a useful technique even if the system has enough physical RAM to get the job done anyway?
- The address space is an abstraction of physical memory, broken up into pages.- Initially, programmers had to split their programs into overlays. With the virtual address space, the operating system can do it for you. - Therefore, even if you don’t need an abundance of address spaces, paging can still provide a tremendous benefit for programmers by saving them from creating overlays, and letting the OS do the work instead.
How does interrupt driven I/O work?Compare strength/weakness of Interrupt I/O to the DMA.
As opposed to programmed I/O where the processor checks if whether the I/O device is ready to transmit data or not, interrupt driven I/O makes the I/O device itself emit a signal to the CPU that it is ready to be serviced.- Programmed I/O… CPU to I/O: “HELLO ARE YOU READY?”- Interrupt I/O: I/O to CPU: “I AM READY!”(+)Interrupt driven I/O is:- Fast- Efficient(-)It does have some problems:- Interrupts can come at inconvenient times, resulting in race condition.DMA is slow, works in heavy I/O environmentDMA handles transfer of data to a buffer location instead of the CPU, however, it is slow. Thus, if there is not enough jobs for the DMA, the fast CPU really should be handling the requests instead.
Short explanation: What is busy waiting?
Process uses its CPU time to ask an I/O device if it is ready or not. In this way, it makes sure other processes cannot enter the critical region of this shared process.
Short explanation: What is a semaphore?
Process will ask for access to the semaphore. This action is an atomic operation. If it is available, the process will be allowed to enter the critical region. The semaphore has a simple queue, first come first served.Processes waiting in the queue are in the blocked state.
Short explanation: What is a driver?
Drivers are programs that operate and control devices in computer systems. The driver provides a software interface to hardware devices, enabling the OS and other programs to access hardware functions without needing to know the details about the hardware in the device itself.
Short explanation: What are the advantages/disadvantages of i-nodes?
Cons:- Storing data in i-nodes increases overhead, making the directory larger, - it also takes longer to traverse the file path to the directory.Pros- It is possible to delete/rename files that are currently being opened by a process. The file will continue to exist until no process has it open anymore.
Short explanation: What are the advantages/disadvantages of i-nodes?
Cons:- Storing data in i-nodes increases overhead, making the directory larger, - it also takes longer to traverse the file path to the directory.Pros- It is possible to delete/rename files that are currently being opened by a process. The file will continue to exist until no process has it open anymore.i-nodes are for FILE MANAGEMENT, not memory management.Every file gets an i-nodepro:- i-node trenger kun være i minnet når fil er åpen
What happens when a new process is made?It must be managed by some data structure. What is it. Imagine the mind map, and explain it.
New process -> must be managed -> information stored in the PCBMajor PCB categories are:PCB -> process identificationPCB -> process state (status of suspended process)PCB -> process controlprocess identification -> index (unique identifier)process state -> save registers before suspending processprocess control -> page tableprocess control -> stateprocess control -> schedulingprocess control -> program counter
The ideal memory should be ___________1. 64-bit1. fast, small and cheap1. 32-bit1. fast, large and cheap
- 64-bit1. fast, small and cheap1. 32-bit1. fast, large and cheap
L1 cache is _ than L2 cache. (Pick two options)1. larger1. slower1. faster1. smaller
- larger1. slower1. faster1. smaller
IC is generally short for ______1. Integrated Circuit1. Intel Computer1. Intern CPU
- Integrated Circuit1. Intel Computer1. Intern CPU
When does a context switch occur?1. No answer text provided. [ ]1. When the HDD is switching between different plates [ ]1. When booting(turning on) the machine [ ]1. When switching from one process to another [ ]
- No answer text provided. [ ]1. When the HDD is switching between different plates [ ]1. When booting(turning on) the machine [ ]1. When switching from one process to another [X]
If the access to a file is prohibited, the system returns a file descriptor.1. True1. False
- True1. False
Which of the following statements is correct?1. A system call only happens when a program requests a service from the kernel and the request is denied.1. A system call is always needed when a program requests a service from the kernel, such as reading data from a file.1. A system call only happens when a program requests a service from the kernel and the request is granted.
- A system call only happens when a program requests a service from the kernel and the request is denied.1. A system call is always needed when a program requests a service from the kernel, such as reading data from a file.1. A system call only happens when a program requests a service from the kernel and the request is granted.
What is the purpose of a file directory?1. Grouping files together in a system to make it more accessible for users and programs.1. Making it possible to automatically place new files when they are created.1. Keeping track of all available system calls for creating, removing, reading and writing files.
- Grouping files together in a system to make it more accessible for users and programs.1. Making it possible to automatically place new files when they are created.1. Keeping track of all available system calls for creating, removing, reading and writing files.
What is the purpose of the Program Counter?1. containing the memory address of the next instruction to be fetched1. telling the CPU when to execute the next instruction of the program code1. keeping track of how many programs that are running
- containing the memory address of the next instruction to be fetched1. telling the CPU when to execute the next instruction of the program code1. keeping track of how many programs that are running
The operating system runs in ________1. kernel mode1. user mode1. private mode1. windows mode
- kernel mode1. user mode1. private mode1. windows mode
______ is a set of standard commands(system-calls) working on UNIX systems1. POSIX1. MINIX1. LINUX1. UNIX
- POSIX1. MINIX1. LINUX1. UNIX
Which word has the same meaning as “sharing” when we are talking about resources?1. multiplexing1. multiallocating1. multispacing
- multiplexing1. multiallocating1. multispacing
Core image is just another expression for address space.1. True1. False
- True1. False
When using virtual memory, the CPU needs a ______ to convert the virtual address to the physical address in RAM.1. GPU1. SSD1. HDD1. MMU
- GPU1. SSD1. HDD1. MMU
The ______ is created per process, and is a set of addresses that the process can use to store its program code and variables as long as the process exists.1. process table1. file descriptor1. address space1. process control block
- process table1. file descriptor1. address space1. process control block
I _______ har man tilgang til all hardware og kan kjøre alle instruksjoner maksinen har mulighet til å kjøre.1. private mode1. kernel mode1. user mode
- private mode1. kernel mode1. user mode
The RAM is _____1. VOLATILE, meaning that it WILL NOT lose its content when the power is switched off. [ ]1. NON-VOLATILE, meaning that it WILL NOT lose its content when the power is switched off. [ ]1. VOLATILE, meaning that it WILL lose its content when the power is switched off. [ ]1. NON-VOLATILE, meaning that it WILL lose its content when the power is switched off. [ ]
- VOLATILE, meaning that it WILL NOT lose its content when the power is switched off. [ ]1. NON-VOLATILE, meaning that it WILL NOT lose its content when the power is switched off. [X]1. VOLATILE, meaning that it WILL lose its content when the power is switched off. [X]1. NON-VOLATILE, meaning that it WILL lose its content when the power is switched off. [ ]
What is the purpose of the PSW(Program Status Word)?1. containing the memory address of the next instruction to be fetched1. containing the memory address of the top of the current stack in memory1. containing essential information about the process, such as priority and mode(user/kernel).
- containing the memory address of the next instruction to be fetched1. containing the memory address of the top of the current stack in memory1. containing essential information about the process, such as priority and mode(user/kernel).
Which of the following are considered as I/O-devices(select all correct answers)?1. Keyboard/Mouse [ ]1. Printer [ ]1. CPU [ ]1. HDD (hard disk drive) [ ]
- Keyboard/Mouse [X]1. Printer [X]1. CPU [ ]1. HDD (hard disk drive) [X]
What is the main job of the CPU?1. fetching and executing instructions1. storing data1. making sure of a stable internet-connection
- fetching and executing instructions1. storing data1. making sure of a stable internet-connection
What does the process table contain?1. Information about which processes that are currently running, and each process’ address space.1. Information about which process that are currently existing, and each process’ core image.1. Information about which process that are currently existing, and all the information about each process other than the content of its own address space.
- Information about which processes that are currently running, and each process’ address space.1. Information about which process that are currently existing, and each process’ core image.1. Information about which process that are currently existing, and all the information about each process other than the content of its own address space.
Which of the following statements are true about processes(choose two)?1. The process-concept exists only in personal computer operating systems [ ]1. A process is fundamentally a container that holds all the information needed to run a program. [ ]1. A process can be seen as a program in execution [ ]1. All processes share a common memory-location called the address space [ ]
- The process-concept exists only in personal computer operating systems [ ]1. A process is fundamentally a container that holds all the information needed to run a program. [X]1. A process can be seen as a program in execution [X]1. All processes share a common memory-location called the address space [ ]
What do we mean when we say that a program is executing?1. That the program is currently not running1. That the program is currently running1. That the program is about to exit
- That the program is currently not running1. That the program is currently running1. That the program is about to exit
Hvilke to hovedfunksjoner har et operativsyste?1. Lese og skrive til hardware1. Håndtere maskinens ressurser og tilby abstraksjoner som skjuler kompleksiteten til systemet1. Håndtere maskinens ressurser og vise GUI(Graphical User Interface) til brukeren
- Lese og skrive til hardware1. Håndtere maskinens ressurser og tilby abstraksjoner som skjuler kompleksiteten til systemet1. Håndtere maskinens ressurser og vise GUI(Graphical User Interface) til brukeren
A _____ occur when the cache line needed is in the cache-memory1. cache hit1. cache miss1. cache line1. memory hit
- cache hit1. cache miss1. cache line1. memory hit
I hvilket tilfelle er det nyttig med tråder?1. Når en prosess har én stor oppgave som for eksempel å regne ut et stort tall.1. Når en prosess har flere oppgaver som kan utføres uavhengig av hverandre.1. Når flere forskjellige prosesser skal kommunisere med hverandre.
- Når en prosess har én stor oppgave som for eksempel å regne ut et stort tall.1. Når en prosess har flere oppgaver som kan utføres uavhengig av hverandre.1. Når flere forskjellige prosesser skal kommunisere med hverandre.
How many processes can be in running-state at the same time on a single-core CPU?1. Impossible to answer, it depends on the size of the process. 1. At least two. 1. One.
- Impossible to answer, it depends on the size of the process. 1. At least two. 1. One.
Multiprograming is when processes are actually running in parallel, not only pseudo-parallel where the CPU is switching back and forth between processes.1. True1. False
- True1. False
In which of the following situations can a race condition occur?1. When two different processes are competing about creating new files as fast as possible. 1. When two or more processes are simultaneously trying to queue a file for printing in the same printer queue. 1. When two or more processes are simultaneously trying to read from a file they don’t have permission to write to.
- When two different processes are competing about creating new files as fast as possible. 1. When two or more processes are simultaneously trying to queue a file for printing in the same printer queue. 1. When two or more processes are simultaneously trying to read from a file they don’t have permission to write to.
Threads can share the virtual address space1. True1. False
- True1. False
A process can only have one thread1. True1. False
- True1. False
Hva er forskjellen på en compute-bound prosess og en I/O-bound prosess?1. En I/O-bound prosess bruker mesteparten av tiden sin på å vente på ekstern informasjon mens en compute-bound prosess kun er begrenset av prosessoren sin hastighet.1. I/O-bound prosesser eksisterer kun på UNIX-baserte operativsystemer, mens compute-bound prosesser kun eksisterer på Windows.1. I/O-bound prosesser eksisterer kun på Windows mens compute-bound prosesser kun eksisterer på UNIX-baserte operativsystemer.1. En I/O-bound prosess er begrenset av hvor raskt prosessoren kan arbeide, mens en compute-bound prosess er begrenset av hvor raskt den kan motta informasjon fra en ekstern kilde.
- En I/O-bound prosess bruker mesteparten av tiden sin på å vente på ekstern informasjon mens en compute-bound prosess kun er begrenset av prosessoren sin hastighet.1. I/O-bound prosesser eksisterer kun på UNIX-baserte operativsystemer, mens compute-bound prosesser kun eksisterer på Windows.1. I/O-bound prosesser eksisterer kun på Windows mens compute-bound prosesser kun eksisterer på UNIX-baserte operativsystemer.1. En I/O-bound prosess er begrenset av hvor raskt prosessoren kan arbeide, mens en compute-bound prosess er begrenset av hvor raskt den kan motta informasjon fra en ekstern kilde.
When booting up the system on a PC, only one process is started. All other processes are started by the user afterwards.1. True1. False
- True1. False
There is only one physical program counter register in the CPU. When a process is running, the program counter belonging to that process is loaded into this register.1. True1. False
- True1. False
Hva er en atomic action i forbindelse med prosesser?1. Det er den minste handlingen som kan utføres av prosessoren. Enten er den helt utført eller ikke påbegynt i det hele tatt.1. Det er en stor oppgave som prosessoren bruker lang tid på å utføre. 1. Det er en farlig handling, f.eks. når en prosess forsøker å dele på null. 1. Det er et begrep som brukes om oppgavene til prosesser som kjører på kjernekraft-anlegg
- Det er den minste handlingen som kan utføres av prosessoren. Enten er den helt utført eller ikke påbegynt i det hele tatt.1. Det er en stor oppgave som prosessoren bruker lang tid på å utføre. 1. Det er en farlig handling, f.eks. når en prosess forsøker å dele på null. 1. Det er et begrep som brukes om oppgavene til prosesser som kjører på kjernekraft-anlegg
A single-core CPU can run many processes, but at any one instant the CPU is running only one process.1. True1. False
- True1. False
A process is an instance of an executing program.1. True1. False
- True1. False
Context Switching between processes is faster than Context Switching between threads.1. True1. False
- True1. False
Which states can a process have?1. Ready, running, blocked1. Ready, runnable, running, blocked1. Running, blocked1. Ready, not ready, blocked
- Ready, running, blocked1. Ready, runnable, running, blocked1. Running, blocked1. Ready, not ready, blocked
A computer with only one CPU are seemingly running several program in parallel (e-mail, browser, word). How is this possible?1. It’s a trick question. It’s not possible to have multiple programs in memory at the same time.1. The different programs are assigned different timeslices to run, and the CPU is switching back and forth between them.1. Multiple cores, one core for each program.
- It’s a trick question. It’s not possible to have multiple programs in memory at the same time.1. The different programs are assigned different timeslices to run, and the CPU is switching back and forth between them.1. Multiple cores, one core for each program.
Multiprogramming systems are systems where the CPU is rapidly switching back and forth between processes.1. True1. False
- True1. False
If we are comparing the computer with baking a cake, which of the items belong together?Program, Process, CPU, Input Data* Recipe […]* Person baking the cake […]* Cake ingredients […]* Activity consisting of the baker reading the recipe, fetching the ingredients and baking the cake […]
- Recipe [Program]* Person baking the cake [CPU]* Cake ingredients [Input data]* Activity consisting of the baker reading the recipe, fetching the ingredients and baking the cake [Process]
When talking about processes, daemons are …1. processes that stay in the background to handle some activity such as email, web pages, printing, and so on.1. processes that handle interaction with (human) users and perform work for them.1. processes that create evil viruses that will try to steal your soul.1. processes that executes their program code in the kernel.
- processes that stay in the background to handle some activity such as email, web pages, printing, and so on.1. processes that handle interaction with (human) users and perform work for them.1. processes that create evil viruses that will try to steal your soul.1. processes that executes their program code in the kernel.
A process can never ask the OS to kill/terminate another process.1. True1. False
- True1. False
Hva er den beste beskrivelsen av en ”race condition” (mest nøyaktige definisjon)?1. Et sett av tråder er i en “race condition” når hver tråd i settet venter på en ressurs som er holdt av en annen tråd i settet.1. En prosess som prøver å få tilgang til en ressurs som er avslått.1. En prosess som står i ventekø, men ikke får tilgang på CPUen fordi andre prosesser har høyere prioritet.1. To eller flere tråder som kjemper om en ressurs og utfallet avhenger av synkroniseringen av trådene.
- Et sett av tråder er i en “race condition” når hver tråd i settet venter på en ressurs som er holdt av en annen tråd i settet.1. En prosess som prøver å få tilgang til en ressurs som er avslått.1. En prosess som står i ventekø, men ikke får tilgang på CPUen fordi andre prosesser har høyere prioritet.1. To eller flere tråder som kjemper om en ressurs og utfallet avhenger av synkroniseringen av trådene.
Hvor mye raskerer er det å opprette enn ny tråd enn en prosess?1. mellom 1 - 10 ganger raskere1. mellom 1 000 - 10 000 ganger raskere1. mellom 10 - 100 ganger raskere1. mellom 100 - 1 000 ganger raskere
- mellom 1 - 10 ganger raskere1. mellom 1 000 - 10 000 ganger raskere1. mellom 10 - 100 ganger raskere1. mellom 100 - 1 000 ganger raskere
Which definition is correct about multiprocessor systems?1. Multiprocessor systems have two or more CPUs sharing the same physical memory.1. Multiprocessor systems have three or more processes running at the same time, because the OS is also a process1. Multiprocessor systems have two or more processes running at the same time.
- Multiprocessor systems have two or more CPUs sharing the same physical memory.1. Multiprocessor systems have three or more processes running at the same time, because the OS is also a process1. Multiprocessor systems have two or more processes running at the same time.
Linux has no concept of a process hierarchy.1. True1. False
- True1. False
A process believes it has the entire memory for itself.1. True1. False
- True1. False
Hva er demand paging?1. At sider(pages) kun fjernes fra minnet når det er fullt og en ny side trenger plass.1. At brukeren selv får mulighet til å velge hvilken paging-algoritme systemet skal ta i bruk.1. At sider(pages) kun lastes inn i minnet når det er bruk for dem.
- At sider(pages) kun fjernes fra minnet når det er fullt og en ny side trenger plass.1. At brukeren selv får mulighet til å velge hvilken paging-algoritme systemet skal ta i bruk.1. At sider(pages) kun lastes inn i minnet når det er bruk for dem.
What is prepaging?1. Removing pages from memory before the memory is filled up is called prepaging.1. Loading the pages before letting processes run is called prepaging.1. Loading the pages before the user can interact with the computer is called prepaging.
- Removing pages from memory before the memory is filled up is called prepaging.1. Loading the pages before letting processes run is called prepaging.1. Loading the pages before the user can interact with the computer is called prepaging.
The ___ is the set of addresses a process can use to address memory.1. address bus1. address space1. address book1. home address
- address bus1. address space1. address book1. home address
Hva stemmer om virtuelle adresser?1. En datamaskin kan ha flere virtuelle adresser enn det finnes fysiske adresser tilgjengelig på maskinen.1. En datamaskin kan kun ha like mange virtuelle adresser som fysiske adresser.1. En datamaskin kan kun ha like mange eller færre virtuelle adresser enn det finnes fysiske adresser tilgjengelig på maskinen.
- En datamaskin kan ha flere virtuelle adresser enn det finnes fysiske adresser tilgjengelig på maskinen.1. En datamaskin kan kun ha like mange virtuelle adresser som fysiske adresser.1. En datamaskin kan kun ha like mange eller færre virtuelle adresser enn det finnes fysiske adresser tilgjengelig på maskinen.
Hva er en sidefeil/pagefault (den mest fullstendige beskrivelsen)?1. En sidefeil/pagefault er når det den prosessen som skal kjøres ikke er klar og hoppes over.1. En sidefeil/pagefault er når det skjer noe galt med svitsjingen av prosesser i minnet.1. En sidefeil/pagefault er når det skjer en feil ved avlesing av en fil fra harddisken.1. En sidefeil/pagefault er når den siden som blir referert ikke befinner seg i det fysiske minnet og må bli hentet.
- En sidefeil/pagefault er når det den prosessen som skal kjøres ikke er klar og hoppes over.1. En sidefeil/pagefault er når det skjer noe galt med svitsjingen av prosesser i minnet.1. En sidefeil/pagefault er når det skjer en feil ved avlesing av en fil fra harddisken.1. En sidefeil/pagefault er når den siden som blir referert ikke befinner seg i det fysiske minnet og må bli hentet.
What is the purpose of a MMU(Memory Management Unit)?1. Manage allocation of memory to processes.1. Manage pages such as defining page-sizes, allocate pages to processes and deleting pages that are not necessary.1. Map virtual addresses onto the physical memory addresses.
- Manage allocation of memory to processes.1. Manage pages such as defining page-sizes, allocate pages to processes and deleting pages that are not necessary.1. Map virtual addresses onto the physical memory addresses.
Denne algoritmen holder sidene(pages) sortert i en lenket liste etter når de lastes inn i minnet. Når en side skal fjernes, ser den etter den eldste siden som ikke er referert til i løpet av det siste klokke-intervallet for å fjerne denne. Er siden referert til derimot, blir den plassert lengst frem som om den var ny. Hvilken sideskifts-algoritme er dette?1. The Optimal page replacement algorithm.1. The Second Chance Page Replacement Algorithm.1. The Not Recently Used page replacement algorithm.1. The Clock Page Replacement Algorithm.1. The First-In,First-Out page replacement algorithm.
- The Optimal page replacement algorithm.1. The Second Chance Page Replacement Algorithm.1. The Not Recently Used page replacement algorithm.1. The Clock Page Replacement Algorithm.1. The First-In,First-Out page replacement algorithm.
A segment is a logical entity, which the programmer must be aware of to make use of it.1. True1. False
- True1. False
A segments length can not change during execution.1. True1. False
- True1. False______________________<__________________
Non-volatile means that the memory will get erased when the power is turned off.1. True1. False
- True1. False
What is the “dirty bit” in a page table entry?1. A bit telling if the file has caused a fault since it was loaded into memory.1. A bit telling if the page has been modified since it was loaded into memory.1. A bit telling if the page has been modified since the program was started.
- A bit telling if the file has caused a fault since it was loaded into memory.1. A bit telling if the page has been modified since it was loaded into memory.1. A bit telling if the page has been modified since the program was started.
What is correct about a page table?1. A page table is a table containing information about all pages belonging to a process and mapping between these virtual pages and the physical page frames. Every process has its own page table.1. A page table is one (often large) table containing information about all pages existing in the entire system, and mapping between these virtual pages and the physical page frames.1. A page table is a table containing information about only the pages that are currently in main memory, and mapping between these virtual pages and the physical page frames.
- A page table is a table containing information about all pages belonging to a process and mapping between these virtual pages and the physical page frames. Every process has its own page table.1. A page table is one (often large) table containing information about all pages existing in the entire system, and mapping between these virtual pages and the physical page frames.1. A page table is a table containing information about only the pages that are currently in main memory, and mapping between these virtual pages and the physical page frames.
When no memory abstractions are used, the processes must use the ___1. virtual addresses.1. physical addresses.1. No answer text provided.1. relative addresses.
- virtual addresses.1. physical addresses.1. No answer text provided.1. relative addresses.
The virtual address space consist of fixed-size units called pages. The corresponding units in the physical memory are called page frames.1. True1. False
- True1. False
Mark every answer that is common to find in a page table entry* I/O bit [ ]* Oversize bit [ ]* Referenced bit [ ]* Modified bit [ ]* Running bit [ ]* Present/absent bit [ ]
- I/O bit [ ]* Oversize bit [ ]* Referenced bit [X]* Modified bit [X]* Running bit [ ]* Present/absent bit [X]
Select ALL the alternatives that is correct to fulfill this sentence. The memory managers job is ______* to keep track of which part of memory that are in use. [ ]* to map virtual addresses into physical addresses. [ ]* to deallocate memory when a process doesn’t need it anymore. [ ]* to allocate memory to processes when they need it. [ ]
- to keep track of which part of memory that are in use. [X]* to map virtual addresses into physical addresses. [ ]* to deallocate memory when a process doesn’t need it anymore. [X]* to allocate memory to processes when they need it. [X]
Memory-compaction requires some CPU-time but is often used because this efficiency-loss is small compared to the disadvantage of multiple holes in memory.1. True1. False
- True1. False
XXXXX holder kontroll på hvilken rekkefølge sidene ble lastet inn i minnet ved hjelp av en lenket liste. Fjerner den eldste siden fra minnet hvis det blir aktuelt med å skifte ut sider. Hvilken sideskiftalgoritme er XXXXX?1. Second Chance1. FIFO (First In First Out)1. LRU (Least Recently Used)1. NRU (Not Recently Used)
- Second Chance1. FIFO (First In First Out)1. LRU (Least Recently Used)1. NRU (Not Recently Used)
A process is trying to perform a memory-instruction to jump to address 20. The OS it is running on has a base-limit register, and the current process’ base is 30. Which address will it jump to?1. 301. 201. 501. 10
- 501. 10_________________________
What is swapping(most precise definition)?1. Swapping is when parts of the process is loaded into main memory temporarily to run before it is moved back on disk so another process can be in memory.1. Swapping is when a process is partially on one RAM-module and partially on one or more other ram-modules.1. Swapping is when the entire process is loaded into main memory temporarily to run before it is moved back on disk so another process can be in memory.
- Swapping is when parts of the process is loaded into main memory temporarily to run before it is moved back on disk so another process can be in memory.1. Swapping is when a process is partially on one RAM-module and partially on one or more other ram-modules.1. Swapping is when the entire process is loaded into main memory temporarily to run before it is moved back on disk so another process can be in memory.
A disadvantage of relocation using base and limit registers is the need to perform an addition when memory-references are made.1. True1. False
- True1. False________________________________________
What is a TLB(Translation Lookaside Buffer)?1. A special book for programmers that contains difficult computer terminology and definitions.1. An algorithm deciding which page to evict from the memory when a page fault occur.1. A protection-mechanism for assuring that a process cannot reference addresses outside its own address-space.1. A hardware device for mapping virtual addresses to physical addresses without going through the page table so that heavily referenced pages can be accessed faster.
- A special book for programmers that contains difficult computer terminology and definitions.1. An algorithm deciding which page to evict from the memory when a page fault occur.1. A protection-mechanism for assuring that a process cannot reference addresses outside its own address-space.1. A hardware device for mapping virtual addresses to physical addresses without going through the page table so that heavily referenced pages can be accessed faster.
Dette er en algoritme som er ofte brukt. Den består av en peker som peker til en rund liste av siderammer (page frames), og bygger blant annet på konseptet med at en prosess har et sett med sider som brukes mye mer enn andre sider og som derfor bør beholdes i minnet. Er den ikke brukt på en tid T, er den ikke i dette settet, men er den modifisert velger algoritmen å planlegge tilbakeskriving til disk og fortsetter videre rundt i listen for å se om det er en annen side som passer bedre å fjerne.(en side som hverken er referert til på en tid T og heller ikke blitt modifisert). Finner den ingen slike sider, går pekeren i ring og finner nå den siden som ble skrevet tilbake til disk i løpet av forrige runde. Hvilken algoritme er det snakk om?1. WSClock1. Aging1. Working Set1. Second Chance
- WSClock1. Aging1. Working Set1. Second Chance
What is the most precise definition of “current virtual time”?1. The amount of time that the CPU has actually been in use in total.1. The amount of actual time since the OS started.1. The amount of CPU time a process has actually used since it started.1. The amount of actual time since the process started.
- The amount of time that the CPU has actually been in use in total.1. The amount of actual time since the OS started.1. The amount of CPU time a process has actually used since it started.1. The amount of actual time since the process started.
Denne algoritmen finner den siden(page) som kommer til å bli brukt sist av alle sidene som er i minnet(main memory), og fjerner denne siden for å gi plass til den siden som trenger plass i minnet. Hvilken sideskifts-algoritme er dette?1. The Not Recently Used page replacement algorithm.1. The Clock Page Replacement Algorithm.1. The First-In,First-Out page replacement algorithm.1. The Second Chance Page Replacement Algorithm.1. The Optimal page replacement algorithm.
- The Not Recently Used page replacement algorithm.1. The Clock Page Replacement Algorithm.1. The First-In,First-Out page replacement algorithm.1. The Second Chance Page Replacement Algorithm.1. The Optimal page replacement algorithm.
What is a character special file?1. A file used to model block-devices such as disks.1. A file related to input/output devices that is used to model serial I/O devices such as printers and networks.1. A file containing user information in binary.1. A file containing user information in ASCII.
- A file used to model block-devices such as disks.1. A file related to input/output devices that is used to model serial I/O devices such as printers and networks.1. A file containing user information in binary.1. A file containing user information in ASCII.
Når man skal ta backup kan man gjøre en “physical dump” eller en “Logical dump”. Hva er riktig om “physical dump”?1. “Physical dump” tar kun med seg filene som har blitt forandret siden sist og som også ligger i spesifiserte mapper.1. “Physical dump” tar backup av hele disken, men tar ikke med ødelagte og tomme blokker.1. “Physical dump” tar backup av hele disken og skriver dermed også blokker som er ødelagte eller tomme/ledige.1. “Physical dump” tar kun med spesifiserte mapper, men tar med seg alt innholdet i disse mappene.
- “Physical dump” tar kun med seg filene som har blitt forandret siden sist og som også ligger i spesifiserte mapper.1. “Physical dump” tar backup av hele disken, men tar ikke med ødelagte og tomme blokker.1. “Physical dump” tar backup av hele disken og skriver dermed også blokker som er ødelagte eller tomme/ledige.1. “Physical dump” tar kun med spesifiserte mapper, men tar med seg alt innholdet i disse mappene.
Hvis man bruker et absolutt sti-navn (absolute path-name) hva må man skrive for å få frem filen?1. Hele stinavnet fra root og til filnavnet1. Bare stinavnet fra den arbeidsmappen vi står i til filnavnet1. Bare filnavnet1. Hele stinavnet fra arbeidsmappen og til filnavnet
- Hele stinavnet fra root og til filnavnet1. Bare stinavnet fra den arbeidsmappen vi står i til filnavnet1. Bare filnavnet1. Hele stinavnet fra arbeidsmappen og til filnavnet
Hva slags metode brukes av filsystemene for å holde orden på mapper nå for tiden?1. Charles strukturen1. Hierarkisk struktur1. Hickney strukturen1. To level struktur
- Charles strukturen1. Hierarkisk struktur1. Hickney strukturen1. To level struktur
What advantages does contiguous disk-space allocation provide?(flere riktige svar)1. It makes the files more resistant against viruses [ ]1. It is simple to implement [ ]1. The read performance is excellent [ ]1. It prevents disks of becoming fragmented [ ]
- It makes the files more resistant against viruses [ ]1. It is simple to implement [X]1. The read performance is excellent [X]1. It prevents disks of becoming fragmented [ ]
An interrupt can be both precise or imprecise. What does it mean that the interrupt is precise?1. That all the instructions up to the program counter (of the program issuing the interrupt request) have completed and none of those instructions beyond it has started.1. That different instructions near the program counter(of the program issuing the interrupt request) are in different stages of completion.1. That the interrupt tells exactly what it want instead of asking the OS to determine what to do.
- That all the instructions up to the program counter (of the program issuing the interrupt request) have completed and none of those instructions beyond it has started.1. That different instructions near the program counter(of the program issuing the interrupt request) are in different stages of completion.1. That the interrupt tells exactly what it want instead of asking the OS to determine what to do.
The disk can read and write blocks of data independently and is therefore a __________1. smart device1. block device1. character device1. hard device
- smart device1. block device1. character device1. hard device
Hvilken av I/O-metodene under bruker polling / busy-waiting?1. Programmert I/O (Programmed I/O)1. I/O ved bruk av DMA1. Avbrudds-dreven I/O(interruptdriven I/O)
- Programmert I/O (Programmed I/O)1. I/O ved bruk av DMA1. Avbrudds-dreven I/O(interruptdriven I/O)
Disk forespørsler kommer inn til disk driveren for sylindrene 10, 22, 20, 2, 40, 6 og 38 i den rekkefølgen. For hver sylinder flytt tar det 6 msek. Armen står på sylinder 20 initielt. Hvor lang søketid er nødvendig for Shortest Seek First (Closest Cylinder next) algoritmen?1. 58 sylindere = 348 msek1. 60 sylindere = 360 msek1. 146 sylindere = 876 msek1. 87 sylindere = 522 msek
- 58 sylindere = 348 msek1. 60 sylindere = 360 msek1. 146 sylindere = 876 msek1. 87 sylindere = 522 msek
Denne I/O metoden krever en egen hardware-komponent som avlaster hvor mye CPUen må gjøre. Hvilken metode er det?1. Avbrudds-dreven I/O(interruptdriven I/O)1. Programmert I/O (Programmed I/O)1. I/O ved bruk av DMA
- Avbrudds-dreven I/O(interruptdriven I/O)1. Programmert I/O (Programmed I/O)1. I/O ved bruk av DMA
What is the difference between a field and a record?1. A field is a local address-space belonging to one single process, while the record is a global address-space shared among all running processes.1. A record is just a basic element of data containing one value, but the field is a unit containing a collection of related records.1. A field is just a basic element of data containing one value, but the record is a unit containing a collection of related fields.1. A field contains information about all kind of files, but a record contains only information about audio-files.
- A field is a local address-space belonging to one single process, while the record is a global address-space shared among all running processes.1. A record is just a basic element of data containing one value, but the field is a unit containing a collection of related records.1. A field is just a basic element of data containing one value, but the record is a unit containing a collection of related fields.1. A field contains information about all kind of files, but a record contains only information about audio-files.
Files are logical units of information created by processes.1. Sant1. Usant
- Sant1. Usant
Hvilke to måter brukes for å holde orden på ledige blokker, altså hvor det er ledig plass på disken?(flere riktige svar)* linked lists [ ]* single level directories [ ]* i-nodes [ ]* path names [ ]* bitmaps [ ]
- linked lists [X]* single level directories [ ]* i-nodes [ ]* path names [ ]* bitmaps [X]
Hva kalles det når DMA(Direct Memory Access)-kontrolleren opererer slik at busen rekvireres, deretter utføres flere overføringer på én gang(overføre mye data) før den frigir busen igjen?1. Interrupt mode1. Cycle stealing1. Burst mode1. Acknowledgement mode
- Interrupt mode1. Cycle stealing1. Burst mode1. Acknowledgement mode
Hva er riktig om DMA?* DMAen har tilgang til bus’en uavhengig av CPUen. [ ]* DMAen brukes for å redusere antall interrupts som går via CPUen. [ ]* Ved bruk av DMA trenger ikke CPUen å håndtere interrupts i forbindelse med I/O. [ ]* Ved overføring av data fra I/O til minnet jobber DMAen mye mer effektivt enn en CPU ville klart å få til. [ ]
- DMAen har tilgang til bus’en uavhengig av CPUen. [X]* DMAen brukes for å redusere antall interrupts som går via CPUen. [X]* Ved bruk av DMA trenger ikke CPUen å håndtere interrupts i forbindelse med I/O. [ ]* Ved overføring av data fra I/O til minnet jobber DMAen mye mer effektivt enn en CPU ville klart å få til. [ ]
Teknikken som består av å først kopiere filer til en disk før de skrives ut kalles ________.1. Trolling1. Tracing1. Lagring1. Spooling
- Trolling1. Tracing1. Lagring1. Spooling
Where is the partition-table located?1. In the \dev\partition on UNIX systems and in the C://Windows/System32 on WIndows systems.1. In the end of the super block1. In the end of the MBR(Master Boot Record)1. In the end of the boot block
- In the \dev\partition on UNIX systems and in the C://Windows/System32 on WIndows systems.1. In the end of the super block1. In the end of the MBR(Master Boot Record)1. In the end of the boot block
Hvilken tildelings(allocation)-metode brukes på bildet her?1. I-nodes1. Kontinuerlig tildeling(Contiguous allocation)1. Lenket liste tildeling (Linked list allocation)1. Lenket liste tildeling med bruk av minne-tabell
- I-nodes1. Kontinuerlig tildeling(Contiguous allocation)1. Lenket liste tildeling (Linked list allocation)1. Lenket liste tildeling med bruk av minne-tabell
Which two categories can I/O devices roughly be divided into?1. Smart devices and stupid devices1. Block devices and character devices1. Soft devices and Hard devices1. Bit devices and byte devices
- Smart devices and stupid devices1. Block devices and character devices1. Soft devices and Hard devices1. Bit devices and byte devices
The interrupt vector contains the program counter pointing to the start of an interrupt-service procedure.1. Usant1. Sant
Svaret er Sant1. Usant1. Sant
I/O units often consist of a mechanical component and an electronic component. What is the electronic component of the I/O unit?1. The device itself1. A Cathode Ray Tube1. A preamble1. A device controller / an adapter
- The device itself1. A Cathode Ray Tube1. A preamble1. A device controller / an adapter
Sector 1000 of the disk is always called the MBR(Master Boot Record), and is used to boot the computer.1. Sant1. Usant
- Sant1. Usant____________________________________
Hva stemmer om diskplass-administrasjon?1. Liten blokk-størrelse(block size) fører til at man sløser med både tiden og plassen.1. Stor blokk-størrelse(block size) fører til at man sløser med tiden, men ikke med plassen.1. Stor blokk-størrelse(block size) fører til at man sløser med både tiden og plassen.1. Stor blokk-størrelse(block size) fører til at man sløser med plassen, men ikke med tiden.
- Liten blokk-størrelse(block size) fører til at man sløser med både tiden og plassen.1. Stor blokk-størrelse(block size) fører til at man sløser med tiden, men ikke med plassen.1. Stor blokk-størrelse(block size) fører til at man sløser med både tiden og plassen.1. Stor blokk-størrelse(block size) fører til at man sløser med plassen, men ikke med tiden.
Hvilke tre deler er en disk sektor delt opp i?1. Hode(preamble), data, TCC (time check code)1. Hode (preamble), data, ECC (error correcting code)1. Data, adresse, ECC (error correcting code)1. Hode, Data, Adresse
- Hode(preamble), data, TCC (time check code)1. Hode (preamble), data, ECC (error correcting code)1. Data, adresse, ECC (error correcting code)1. Hode, Data, Adresse
Hvilken av disse I/O-teknikkene bruker ikke interrupts?1. Programmert I/O (Programmed I/O)1. I/O ved bruk av DMA1. Avbrudds-dreven I/O(interruptdriven I/O)
- Programmert I/O (Programmed I/O)1. I/O ved bruk av DMA1. Avbrudds-dreven I/O(interruptdriven I/O)
Hvordan er det mest vanlig at filsystemer håndterer diskplass-administrasjon?1. Ved å defragmentere harddisken så snart filer slettes for å komprimere området som skrives på.1. Ved å lagre alle filer tilhørende én prosess etter hverandre.1. Ved å lagre hele filer som fortløpende bytes (altså alt innhold i én fil etter hverandre).1. Ved å å dele opp i blokker på bestemte størrelser og lagre dem der det er mest hensiktsmessig.
- Ved å defragmentere harddisken så snart filer slettes for å komprimere området som skrives på.1. Ved å lagre alle filer tilhørende én prosess etter hverandre.1. Ved å lagre hele filer som fortløpende bytes (altså alt innhold i én fil etter hverandre).1. Ved å å dele opp i blokker på bestemte størrelser og lagre dem der det er mest hensiktsmessig.
Hvilke tre essensielle krav stilles til operativsystemer for å lagre informasjon/data over lengre tid?1. 1 - kunne lagre store mengder informasjon, 2 - informasjonen må kunne overleve selv om man forsøker å slette den(papirkurv), 3 - bare prosessen som eier filen må kunne endre informasjonen.1. 1 - kunne lagre flere typer informasjon, 2 - informasjonen må overleve selv om den flyttes til andre lagringsmedier, 3 - informasjonen må kunne aksesseres på tvers av operativsystemer.1. 1 - kunne lagre store mengder informasjon, 2 - informasjonen må overleve selv om prosessen terminerer, 3 - flere prosesser må ha mulighet til å aksessere informasjonen samtidig.1. 1 - kunne skille på filtyper for å avgjøre hvilket program som skal åpne filen 2 - kunne lagre informasjonen permanent, 3 - kunne lagre filer i et hierarkisk filtre.
- 1 - kunne lagre store mengder informasjon, 2 - informasjonen må kunne overleve selv om man forsøker å slette den(papirkurv), 3 - bare prosessen som eier filen må kunne endre informasjonen.1. 1 - kunne lagre flere typer informasjon, 2 - informasjonen må overleve selv om den flyttes til andre lagringsmedier, 3 - informasjonen må kunne aksesseres på tvers av operativsystemer.1. 1 - kunne lagre store mengder informasjon, 2 - informasjonen må overleve selv om prosessen terminerer, 3 - flere prosesser må ha mulighet til å aksessere informasjonen samtidig.1. 1 - kunne skille på filtyper for å avgjøre hvilket program som skal åpne filen 2 - kunne lagre informasjonen permanent, 3 - kunne lagre filer i et hierarkisk filtre.
Hvor blir feilbehandlingen (error handling) gjort i sammenheng med å lese en diskblokk?1. I operativsystemet1. I harddisken1. I applikasjonen1. I kontrolleren
- I operativsystemet1. I harddisken1. I applikasjonen1. I kontrolleren
Hvilken tidsfaktor er det som dominerer når det gjelder å lese og skrive blokker fra en harddisk?1. Faktisk overføringstid1. Rotasjonsforsinkelsen1. Hoppetiden1. Søketiden
- Faktisk overføringstid1. Rotasjonsforsinkelsen1. Hoppetiden1. Søketiden
Hvilket alternativ er riktig om Memory-Mapped I/O?1. Med memory-mapped I/O får kontroll-registerne til enhetskontrollerne(device controllers) tildelt en egen I/O port.1. Med memory-mapped I/O kan man aktivere caching av kontroll-registerne til enhetskontrollerne(device controllers) for å kommunisere mer effektivt med disse registerne.1. Med memory-mapped I/O får kontroll-registerne til enhetskontrollerne(device controllers) tildelt en egen minneadresse.
- Med memory-mapped I/O får kontroll-registerne til enhetskontrollerne(device controllers) tildelt en egen I/O port.1. Med memory-mapped I/O kan man aktivere caching av kontroll-registerne til enhetskontrollerne(device controllers) for å kommunisere mer effektivt med disse registerne.1. Med memory-mapped I/O får kontroll-registerne til enhetskontrollerne(device controllers) tildelt en egen minneadresse.
Hva er riktig om i-nodes?1. Det opprettes kun én i-node per prosess.1. i-noden trenger kun å være i minnet når den korresponderende filen er åpen.1. i-noden kan kun kjøres på Apple-produkter.1. alle i-nodene må alltid være i minnet.
- Det opprettes kun én i-node per prosess.1. i-noden trenger kun å være i minnet når den korresponderende filen er åpen.1. i-noden kan kun kjøres på Apple-produkter.1. alle i-nodene må alltid være i minnet.
What do we mean when we say that the information stored in files must be persistent?1. That the information must be possible to access from all types of Operating Systems.1. That the information must not be affected by process creation and termination.1. That the information must be stored in a tidy order to ensure fast reading and writing.1. That the information must be possible to access from all UNIX-based Operating Systems.
- That the information must be possible to access from all types of Operating Systems.1. That the information must not be affected by process creation and termination.1. That the information must be stored in a tidy order to ensure fast reading and writing.1. That the information must be possible to access from all UNIX-based Operating Systems.