-
Home
- Operating systems
- Lecture notes
- Memory management
Static relocation with protection keys (IBM S/360
approach):
- Protection Key = a small integer stored with each chunk of memory.
The chunks are likely to be 1k-4k bytes.
- Keep an extra hardware register to identify the current process.
This is called the process id, or PID. 0 is reserved for the operating system'sprocess id.
- On every memory reference, check the PID of the current process
against the key of the memory chunk being accessed. PID 0 is allowed to touchanything, but any other mismatch results in an error trap.
- Additional control: who is allowed to set the PID? How does OS
regain control once it has given it up?
- This is the scheme used for the IBM S/360 family. It is safe but
inconvenient:
- Programs have to be
relocated before loading. In some systems (e.g. MPS) this requires completerelinking. Expensive.
- Cannot share information between two
processes very easily
- Cannot swap a process out to secondary
storage and bring it back to a different location
Dynamic memory relocation: instead of changing the
addresses of a program before it is loaded, we change the address dynamicallyduring every reference.
- Under dynamic relocation, each program-generated address (called a
logical or virtual address) is translated in hardware to a physical, or realaddress. This happens as part of each memory reference.
- Show how dynamic relocation leads to two views of memory, called
address spaces. With static relocation we force the views to coincide so thatthere can be several levels of mapping.
Base and bounds, segmentation
Base&bounds relocation:
- Two hardware registers: base address for process, bounds register
that indicates the last valid address the process may generate.
Each process must be allocated contiguously in real
memory.
- On each memory reference, the virtual address is compared to the
bounds register, then added to the base register. A bounds violation results inan error trap.
- Each process appears to have a completely private memory of size
equal to the bounds register plus 1. Processes are protected from each other. Noaddress relocation is necessary when a process is loaded.
- Typically, the OS runs with relocation turned off, and there are
special instructions to branch to and from the OS while at the same time turningrelocation on and off. Modification of the base and bounds registers must also
be controlled.
- Base&bounds is cheap -- only 2 registers -- and fast -- the
add and compare can be done in parallel.
- Explain how swapping can work.
- Examples: CRAY-1.
Problem with base&bound relocation:
- Only one segment. How can two processes share code while keeping
private data areas (e.g. shared editor)? Draw a picture to show that it cannotbe done safely with a single-segment scheme.
Multiple segments.
- Permit process to be split between several areas of memory. Each
area is called a segment and contains a collection of logically-relatedinformation, e.g. code or data for a module.
- Use a separate base and bound for each segment, and also add a
protection bit (read/write).
- Each memory reference indicates a segment and offset in one or
more of three ways:
- Top bits of
address select segment, low bits the offset. This is the most common, and thebest.
- Or, segment is selected implicitly by the operation being
performed (e.g. code vs. data, stack vs. data).
- Or, segment is
selected by fields in the instruction (as in Intel x86 prefixes).
Questions & Answers
what does preconceived mean
How can I develope my cognitive domain
why is communication effective
Communication is effective because it allows individuals to share ideas, thoughts, and information with others.
effective communication can lead to improved outcomes in various settings, including personal relationships, business environments, and educational settings. By communicating effectively, individuals can negotiate effectively, solve problems collaboratively, and work towards common goals.
it starts up serve and return practice/assessments.it helps find voice talking therapy also assessments through relaxed conversation.
miss
Every time someone flushes a toilet in the apartment building, the person begins to jumb back automatically after hearing the flush, before the water temperature changes. Identify the types of learning, if it is classical conditioning identify the NS, UCS, CS and CR. If it is operant conditioning, identify the type of consequence positive reinforcement, negative reinforcement or punishment
please i need answer
Wekolamo
because it helps many people around the world to understand how to interact with other people and understand them well, for example at work (job).
Agreed 👍 There are many parts of our brains and behaviors, we really need to get to know. Blessings for everyone and happy Sunday!
ARC
A child is a member of community not society elucidate ?
Isn't practices worldwide, be it psychology, be it science. isn't much just a false belief of control over something the mind cannot truly comprehend?
compare and contrast skinner's perspective on personality development on freud
Skinner skipped the whole unconscious phenomenon and rather emphasized on classical conditioning
war
explain how nature and nurture affect the development and later the productivity of an individual.
nature is an hereditary factor while nurture is an environmental factor which constitute an individual personality. so if an individual's parent has a deviant behavior and was also brought up in an deviant environment, observation of the behavior and the inborn trait we make the individual deviant.
Samuel
I am taking this course because I am hoping that I could somehow learn more about my chosen field of interest and due to the fact that being a PsyD really ignites my passion as an individual the more I hope to learn about developing and literally explore the complexity of my critical thinking skills
and having a good philosophy of the world is like a sandwich and a peanut butter 👍
Jonathan
generally amnesi how long yrs memory loss
interpersonal relationships
What would be the best educational aid(s) for gifted kids/savants?
treat them normal, if they want help then give them.
that will make everyone happy
Saurabh
What are the treatment for autism?
hello. autism is a umbrella term. autistic kids have different disorder overlapping. for example. a kid may show symptoms of ADHD and also learning disabilities.
before treatment please make sure the kid doesn't have physical disabilities like hearing..vision..speech problem. sometimes these
Jharna
continue..
sometimes due to these physical problems..the diagnosis may be misdiagnosed.
treatment for autism.
well it depends on the severity.
since autistic kids have problems in communicating and adopting to the environment.. it's best to expose the child in situations where the child
Jharna
child interact with other kids under doc supervision.
play therapy.
speech therapy.
Engaging in different activities that activate most parts of the brain.. like drawing..painting. matching color board game.
string and beads game.
the more you interact with the child the more effective
Jharna
results you'll get..
please consult a therapist to know what suits best on your child.
and last as a parent. I know sometimes it's overwhelming to guide a special kid.
but trust the process and be strong and patient as a parent.
Jharna
Got questions? Join the online conversation and get instant answers!
Source:
OpenStax, Operating systems. OpenStax CNX. Aug 13, 2009 Download for free at http://cnx.org/content/col10785/1.2
Google Play and the Google Play logo are trademarks of Google Inc.